Swift Playground All In One
Swift Playground All In One
Swift 5.3
- Playgrounds in Xcode
Xcode 11.5
https://developer.apple.com/videos/play/wwdc2018/402/
- 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 发布文章使用:只允许注册用户才可以访问!
Swift Playground All In One的更多相关文章
- Swift Playground词法分析器DEMO
正在看极客时间宫文学老师的编译原理之美,用swift playground写了一个第二课"int age >= 45"的词法解析DEMO 为了保持原课程代码,DEMO用了顺序 ...
- Swift PlayGround无限Running问题
这个问题我想肯定很多人都有遇到过,如果你正好面试iOS,用这个playground写算法的话遇到这种情况只能hehe了-- 我是这样解决的,一开始我build project的时候选得是iOS的pla ...
- Swift 3 新特性
原文:What's New in Swift 3? ,作者:Ben Morrow,译者:kmyhy Swift 3将于今年下半年推出,为Swift开发者们带来了很多核心代码的改变.如果你没有关注过 S ...
- Breaking Down Type Erasure in Swift
Type Erasure Pattern We can use the type erasure pattern to combine both generic type parameters and ...
- Xcode & swift
swift-apps swift 2018 apps Xcode Swift Playground https://developer.apple.com/download/ https://deve ...
- Swift来了,是不是能够入手IOS开发了?
在今天的WWDC2014上,苹果公布了一种全新的Swift.在苹果高管 Craig Federighi 的描写叙述中,Swift 在各个方面优于 Objective-C,也不会有那么多复杂的符号和表达 ...
- Swift 环境搭建
Swift 环境搭建 Swift是一门开源的编程语言,该语言用于开发OS X和iOS应用程序. 在正式开发应用程序前,我们需要搭建Swift开发环境,以便更好友好的使用各种开发工具和语言进行快速应用开 ...
- iOS:iOS开发非常全的三方库、插件等等
iOS开发非常全的三方库.插件等等 github排名:https://github.com/trending, github搜索:https://github.com/search. 此文章转自git ...
- WWDC 2016 总结
一年一次的WWDC,是开发者充值信仰的时刻,今天你的信仰充值了吗?欢迎在本文下面留言吐槽. 有外媒称,这届WWDC苹果将“fun”伪装成“innovation”,的确,看看另两家老对手,微软有黑科技H ...
随机推荐
- mysql(连接查询和数据库设计)
--创建学生表 create table students ( id int unsigned not null auto_increment primary key, name varchar(20 ...
- Python+Selenium+Unittest实现PO模式web自动化框架(4)
1.PageLocators目录下的具体模块 2.PageLocators目录下主要放置个页面的元素定位.用于统一管理个页面的定位元素. 例如:登录页面的元素定位login_page_locator. ...
- top命令详解-性能分析
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,常用于服务端性能分析. top命令说明 [www.linuxidc.com@linuxidc-t-tomcat-1 ...
- 登陆的时候出现javax.xml.bind.DatatypeConverter错误
错误详情: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/Da ...
- 进程通信类型 管道是Linux支持的最初Unix IPC形式之一 命名管道 匿名管道
管道 Linux环境进程间通信(一) https://www.ibm.com/developerworks/cn/linux/l-ipc/part1/index.html 管道及有名管道 郑彦兴200 ...
- Web信息收集之搜索引擎-Shodan Hacking
Web信息收集之搜索引擎-Shodan Hacking 一.Shodan Hacking简介 1.1 ip 1.2 Service/protocol 1.3 Keyword 1.4 Cuuntry 1 ...
- Linux性能分析:生产环境服务器变慢,诊断思路和性能评估
Linux性能分析:生产环境服务器变慢,诊断思路和性能评估 一.整机:top 二.CPU:vmstat 所有CPU核信息 每个进程使用CPU的用量分解信息 三.内存:free 四.硬盘:df 五.磁盘 ...
- scala 时间,时间格式转换
scala 时间,时间格式转换 1.scala 时间格式转换(String.Long.Date) 1.1时间字符类型转Date类型 1.2Long类型转字符类型 1.3时间字符类型转Long类型 2. ...
- Spring boot 异步线程池
package com.loan.msg.config; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandle ...
- js创建javaMap
/** * Simple Map * var m = new Map(); * m.put('key','value'); * var v_otherMap = v_m.toMapString();* ...