【发布时间】:2016-02-06 05:20:54
【问题描述】:
我使用 XCode 7.1 创建了一个简单的 Playground,并且输入了以下简单代码:
import UIKit
import XCPlayground
var str = "Hello, playground"
let color = UIColor (red: 1 , green: 1 , blue: 0 , alpha: 0 )
let view = UIView()
view.backgroundColor = UIColo (colorLiteralRed: 1 , green: 0 , blue: 0 , alpha: 0 )
view.frame = CGRect (x: 0 ,y: 0 ,width: 100 ,height: 100 )
let label = UILabel (frame: CGRect (x: 5 , y: 5 , width: 50 , height: 20 ))
label.text = str
view.addSubview(label)
playground 运行时,不显示 UIKit 对象预览,只显示调试信息:
我做错了什么?
【问题讨论】:
标签: ios swift xcode uikit swift-playground