individualPercUpdated
被调用UIControlEventEditingDidEnd
和checkInitialValue
被调用UIControlEventEditingDidBegin
。if(!([initialValue isEqualToString:textField.text]))
通过发出警告 Exec Bad Access我的 prog 在线崩溃
- (void)viewDidLoad
{
[super viewDidLoad];
initialValue=[[NSString alloc] init];
}
-(void) individualPercUpdated:(UITextField *)textField{
if(initialValue!=nil){
if(!([initialValue isEqualToString:textField.text])){
initialValue=textField.text;
NSLog(@"%@",textField.text);
}
}
else{
NSLog(@"%@",textField.text);
}
}
-(void) checkInitialValue:(UITextField *)textField{
initialValue=textField.text;
}
}