override func viewDidLoad() {
super.viewDidLoad()
let button = UIButton.buttonWithType(UIButtonType.System) as! UIButton
button.frame = CGRectMake(100, 100, 80, 50)
button.backgroundColor = UIColor.orangeColor()
button.setTitle("选照片", forState: UIControlState.Normal)
button.addTarget(self, action: "clickBtn:", forControlEvents: UIControlEvents.TouchUpInside)
self.view.addSubview(button)
}
func clickBtn(sender:UIButton){
self.fromAlbum()
}
【swift系列之UIButton】简单使用
最新推荐文章于 2016-01-01 12:59:02 发布