解釋對此進行了詳細(代碼的每一行),我明白它做什麼,但我努力把它解釋爲在代碼中的註釋:能否請您解釋一下下面的代碼,尤其是FUNC聲明
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
}
我們不是免費的文檔編寫服務。 –
我認爲你可以嘗試在http://codereview.stackexchange.com/ – Idan
標記這個脫離主題,因爲它看起來像你需要的是一個非現場服務或教程 –