func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if range.length == 1 && string.count == 0 {
return true
}else if textField.text!.count >= 12 {
return false
}
return true
}
网友评论