【发布时间】:2017-04-15 13:24:11
【问题描述】:
这段代码是如何工作的 -
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField.resignFirstResponder() {
textField.text = nil
}
return true
}
func textFieldDidEndEditing(_ textField: UITextField) {
theTextField.text = textField.text
}
我不明白,我知道它的作用,但我需要一些帮助来理解代码的含义。谢谢! :)
【问题讨论】:
标签: ios delegates uitextfield textfield uitextfielddelegate