#pragma mark - 显示超过11位不让输入
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
NSString * str1 = _nameTextFiled.text;
NSString * str2 = _numberTextFiled.text;
NSString * str3 = _passWordTextFiled1.text;
NSString * str4 = _passWordTextFiled2.text;
if (textField == _nameTextFiled) {
str1 = [_nameTextFiled.text stringByAppendingString:string];
}else if (textField == _numberTextFiled){
str2 = [_numberTextFiled.text stringByAppendingString:string];
}else if (textField == _passWordTextFiled1){
str3 = [_passWordTextFiled1.text stringByAppendingString:string];
}else if (textField == _passWordTextFiled2){
str4 = [_passWordTextFiled2.text stringByAppendingString:string];
}
//保存按钮显示与隐藏
if (str1.length*str2.length*str3.length*str4.length!=0) {
[self SaveButtonEnbale];
}else{
[self SaveButtonNotEnbale];
}
return YES;
}