ios - xcode 7 中 UIControlStateEvents 的新语法是什么?

标签 ios swift syntax xcode7

更新到 xcode 7 后,我不断收到很多以前可以运行的代码的多个错误。我知道语法已经改变了,但我一直没有找到更新的语法。有人可以告诉我我应该为以下内容更改什么吗:

but.addTarget(self, action: "toTrack", forControlEvents: UIControlEventTouchUpInside)

UIControlEventTouchUpInside 是上面未解析的标识符,以及我使用的另一个代码片段中的 UIControlEventTouchDragInside。这些 UIControlStateEvents 都变成了什么?

最佳答案

UIControlEvent.TouchUpInsideUIControlEvent.TouchDragInside

关于ios - xcode 7 中 UIControlStateEvents 的新语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33437591/

相关文章:

ios - swift 3 : Back to last ViewController with sending data

ios - UITableView selectRowAtIndexPath 断言失败

ios - 使用自定义 View Controller 转换,我在哪里可以隐藏状态栏?

ios - 选项卡栏项目图像未显示

php - PHP 中单引号和双引号字符串有什么区别?

OCaml 仿函数的语法糖

ios - 我如何让用户输入密码以注销。解析/swift

ios - 从 Firebase 存储中删除表格 View 图像

ios - swift:更改包含多个 map 的数组中的字典值

Ruby: bool 正则表达式方法的正确语法是什么?