swift设置UIButton的title文字

1
2
let btn = UIButton(frame: CGRect(x: x, y: y, width: 20 , height: 20 ) )
btn.setTitle("click", forState: UIControlState.Normal)
Share