I'm working on a small project and using several textField.
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
if(textField.tag ==0){
[self.PWText becomeFirstResponder];
return false;
}else if(textField.tag ==1){
[self.PWTextCheck becomeFirstResponder];
return false;
}else if(textField.tag ==2){
[self.nameText becomeFirstResponder];
return false;
}else if(textField.tag ==3){
[self.phoneText becomeFirstResponder];
return false;
}else{
[self.phoneText resignFirstResponder];
return true;
}}
as I know I'll use this delegate method when I want to make the keyboard disappear when the user tap the "return" button on the keyboard.
no matter which one I returned there no difference as I seen from the simulator, if I want to make the keyboard disappear I use :
[... resignFirstResponder];
and when I want the keyboard focus on one of the textField I use:
[... becomeFirstResponder];
but why should I return a True/False in this method?