【发布时间】:2016-11-27 01:39:03
【问题描述】:
详细解释这一点(代码的每一行),我理解它的作用,但我很难将其解释为代码中的注释:
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
let text = (lvl1_textfield.text! as NSString).stringByReplacingCharactersInRange(range, withString: string)
if text.isEmpty{
guess_enter.hidden = true
} else {
guess_enter.hidden = false
}
return true
}
【问题讨论】:
-
我们不是免费的文档写作服务。
-
我觉得你可以试试codereview.stackexchange.com
-
将此标记为离题,因为您似乎需要的是场外服务或教程