Swift Playground All In One

Swift 5.3

  1. Playgrounds in Xcode

Xcode 11.5

https://developer.apple.com/videos/play/wwdc2018/402/

  1. Learn to Code with Swift Playgrounds

https://developer.apple.com/swift-playgrounds/

Swift Playgrounds for iPad

http://appstore.com/swiftplaygrounds

Swift Playgrounds for Mac

https://apps.apple.com/app/id1496833156


demo

WkWebView

//: A UIKit based Playground for presenting user interface

import PlaygroundSupport

import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://www.apple.com")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
}
// Present the view controller in the Live View window
PlaygroundPage.current.liveView = ViewController()

//: A UIKit based Playground for presenting user interface

import UIKit
import PlaygroundSupport class MyViewController : UIViewController {
override func loadView() {
let view = UIView()
view.backgroundColor = .white let label = UILabel()
label.frame = CGRect(x: 150, y: 200, width: 200, height: 20)
label.text = "Hello World!"
label.textColor = .black view.addSubview(label)
self.view = view
}
}
// Present the view controller in the Live View window
PlaygroundPage.current.liveView = MyViewController()

refs

iOS WebView All In One

https://www.cnblogs.com/xgqfrms/p/13883680.html



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


最新文章

  1. [Web开发] 在HTML代码里面如何判断IE版本
  2. mongodb的查询语句学习摘要
  3. SAP ALV内嵌(In-place)Excel的问与答
  4. 一个js对象的代码结构
  5. android.content.Context 含义及使用
  6. COUNT(*)与COUNT(列名)的区别(转)
  7. PHPCMS栏目调用2
  8. GitHub 的分支创建与合并
  9. TCP错误恢复特性之一TCP重传
  10. python---协程 学习笔记
  11. 业余草基于JAVA的模块化开发框架JarsLink
  12. iptables 端口转发规则
  13. 前K个高频元素
  14. 将Long类型转为字母数字组合的jar包---Hashids
  15. Integer Sequence Dividing CodeForces - 1102A (规律)
  16. 高性能计算linux集群常用配置
  17. 创建含有多module的springboot工程(八)
  18. python之模块poplib之常见用法
  19. VS2013密钥(所有版本)
  20. ligerUI利用a标签下载文件

热门文章

  1. echarts图表X轴文字过长解决解决方案:根据文字长度自动旋转
  2. Redis布隆过滤器与布谷鸟过滤器
  3. 可视化Go内存管理
  4. Cognos软件介绍文档(原创)
  5. centos7 快速搭建redis集群环境
  6. linux设置用户登录提示
  7. python模块----sys模块 (系统相关的参数和函数)
  8. centos6.5 更新python2.6.6至2.7.6
  9. Flink-v1.12官方网站翻译-P020-Builtin Watermark Generators
  10. charles(3)charles防止30分钟自动重启