Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在文本字段中,我需要检测用户按 Enter(返回)键。委托方法与 UITextField 中的完全不同,所以不太确定该怎么做......我使用 swift 2.3 atm。
当用户enter击键时委托方法
func controlTextDidEndEditing(_ aNotification : Notification)
叫做。
这是 Swift 3 的语法。键入cont并使用代码完成来获取 Swift 2 语法。
cont