<pre>
//点击事件
button.addTarget(self, action:
selector(SwiftTimeSelectViewController.makeSureSelectTime(_:)), for: UIControlEvents.touchUpInside)
//点击事件的方法
func makeSureSelectTime(_ button:UIButton) -> Void {
}
</pre>
<pre>
//点击事件
button.addTarget(self, action:
//点击事件的方法
func makeSureSelectTime(_ button:UIButton) -> Void {
}
</pre>
本文标题:Swift 学习之 button 点击事件传递触摸对象踩的坑
本文链接:https://www.haomeiwen.com/subject/pppduttx.html
网友评论