Created
January 15, 2014 01:50
-
-
Save tonyalbor/8429376 to your computer and use it in GitHub Desktop.
hitting return on the keyboard will go to the next textfield
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
- (BOOL)textFieldShouldReturn:(UITextField *)textField { | |
NSInteger nextTag = textField.tag + 1; | |
UIResponder *nextResponder = [[textField superview] viewWithTag:nextTag]; | |
if(nextResponder) [nextResponder becomeFirstResponder]; | |
else [textField resignFirstResponder]; | |
return NO; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment