swift 代码添加按钮

var btn = UIButton(frame: CGRect(x: 200, y: 200, width: 100, height: 100))

btn.setTitle("jicheng", forState: UIControlState.Normal)

//btn.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)

// btn.setTitleColor(UIColor.blueColor(), forState: UIControlState.Highlighted)

// btn.setTitleShadowColor(UIColor.greenColor(), forState: UIControlState.Normal)

//btn.backgroundColor = UIColor.blackColor()

view.addSubview(btn)

上一篇:append appendChild appendTo区别


下一篇:天天动听MP3解码器性能提升50%