美文网首页
开始学习 swift 第一天学会创建一个 UILabel

开始学习 swift 第一天学会创建一个 UILabel

作者: 马爷 | 来源:发表于2016-05-17 16:50 被阅读166次

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

相关文章

网友评论

      本文标题:开始学习 swift 第一天学会创建一个 UILabel

      本文链接:https://www.haomeiwen.com/subject/cxpirttx.html