1
如何做到這一點的代碼工作 -代碼含義是什麼? UITextFieldDelegate
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField.resignFirstResponder() {
textField.text = nil
}
return true
}
func textFieldDidEndEditing(_ textField: UITextField) {
theTextField.text = textField.text
}
我不明白,我知道它做什麼,但我需要一些幫助來了解一下代碼的含義。謝謝! :)
感謝您的幫助! – bernan