Commit 75425af6 authored by Steven杜宇's avatar Steven杜宇

// 家庭

parent ea572067
...@@ -267,18 +267,14 @@ extension YHInfoItemView: UITextFieldDelegate { ...@@ -267,18 +267,14 @@ extension YHInfoItemView: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true { // 点击删除
return true
}
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string) let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
// if newText.count > Self.maxWordsCount { // if newText.count > Self.maxWordsCount {
// YHHUD.flash(message: "限制最多\(Self.maxWordsCount)个字符") // YHHUD.flash(message: "限制最多\(Self.maxWordsCount)个字符")
// return false // return false
// } // }
printLog("\(newText)")
self.item.value = newText self.item.value = newText
self.updateItem(item)
return true return true
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment