I want to make a login system with two textfields. I want the user to edit the first textfield and by clicking next on the keyboard jump over to the next textfield and after editing that he should click go and the system should do it's thing. So what I really want is to be able to jump from one textfield to the next and the most important part get the input text from both fields when the user clicks the go button (witch is on the second field's keyboard). both my text fields are tagged in IB. If it's not very clear I want to implement something very similar to the Podio's app login. This is what I have so far. Any help much appreciated:
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
AppSettings *settings = [AppSettings sharedSettings];
NSString *password;
NSString *name;
if(textField == nameTextField)
{
name = textField.text;
NSLog(@"Name text field: %@",name);
}
if(textField == passwordTextField)
{
password = textField.text;
NSLog(@"Password text field: %@",password);
}
//this is where I send a call to the server
[[SessionInfo sharedInfo] loginWithEmail:settings.userEmailFromLogin
AndName:name AndPasswordRequest:password];
[textField resignFirstResponder];
return YES;
}