This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITextFieldDelegate method, called when the "Return" key is pressed. | |
// Either advance the cursor to the next empty field, or submit the form. | |
// | |
- (BOOL)textFieldShouldReturn:(UITextField *)textField { | |
if([usernameField.text length] == 0) { | |
[usernameField becomeFirstResponder]; | |
} else if ([passwordField.text length] == 0) { | |
[passwordField becomeFirstResponder]; | |
} else { |