【发布时间】:2020-02-12 10:26:01
【问题描述】:
我在我的 macOS 设备上从 AppStore 下载了 Swift Playgrounds v3.2。我想在一个空项目中展示 UIViewController 类的一个实例。我试着用PlaygroundPage.current.liveView = vc 在 Xcode 操场上展示它,但它不起作用。
import PlaygroundSupport
let vc = UIViewController()
PlaygroundPage.current.liveView = vc
PlaygroundPage.current.needsIndefiniteExecution = true
【问题讨论】:
标签: ios swift swift-playground