letlabel =UILabel(frame:CGRectMake(10,20,200,200))
self.view.addSubview(label)
label.text="开始学习swift"
label.textColor=UIColor.redColor()
label.backgroundColor=UIColor.brownColor()
label.textAlignment=NSTextAlignment.Center
label.font=UIFont.boldSystemFontOfSize(15)
label.layer.cornerRadius=5.0
label.layer.masksToBounds=true
网友评论