Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pashik

macrumors member
Original poster
Jul 16, 2008
43
0
Hi.

There is view with 2 UITextField and login button.
When user is in password textbox keyboard is shown with return key set as "Go".
How i can set that return key to make action from Login button so user don't need to close keyboard and touch Login button?

Thanx in advance for reply.
 
You have to set up a UITextField delegate to handle what you're talking about. I don't have any code that I can post up since I'm at work. I could post something later, though.
 
You have to set up a UITextField delegate to handle what you're talking about. I don't have any code that I can post up since I'm at work. I could post something later, though.

It would be great if u show some code.
 
here is code which works:
Code:
// UITextFieldDelegate

- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
	[theTextField resignFirstResponder];
	if(theTextField = myPasswordTextField)
	   [self onLoginButtonClicked];
	return YES;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.