1.button设置title
LoginBtn.setTitle("Normal", forState: UIControlState.Normal)//平时的状态的title
LoginBtn.setTitle("lighted", forState:UIControlState.Highlighted)//高亮的状态的title
2.添加点击事件
LoginBtn .addTarget(self, action:"commitData", forControlEvents: UIControlEvents.TouchUpInside)//点击button内部出发方法commitData 不带擦参数,要是带参数action写成commitData:多了个冒号 下边的写法也可以
LoginBtn .addTarget(self, action:Selector ("commitData:"), f