【发布时间】:2016-06-03 17:18:54
【问题描述】:
如何以编程方式向按钮添加操作。我需要向 mapView 中的按钮添加显示操作。谢谢
let button = UIButton(type: UIButtonType.Custom) as UIButton
【问题讨论】:
-
button.addTarget(self, action: "action:", forControlEvents: UIControlEvents.TouchUpInside)
-
这只会导致错误@MuhammadRaheelMateen
-
请分享错误日志