关于Swift UI的问题

let label = UILabel(frame:CGRect(origin: CGPointMake(10.0, 50.0), size: CGSizeMake(150,50)))
label.text = “This is a Label” // 该行报错,Expected declaration
self.view.addSubview(label)

let btn = UIButton(frame:CGRect(origin: CGPointMake(10.0, 110.0), size: CGSizeMake(150,50)))
btn.setTitle("button", forState: UIControlState.Normal)// 该行报错,Expected declaration

ps:text在UILabel里有,setTitle在UIButton里面也有,为何报错呢

额,我弄好了,原来是放错位置,这些代码来自
http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=200702428&idx=1&sn=780f991c6633c513a9b1265dab754504&scene=2#rd
Swift UI 初探,大家可以尝试一下