Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 16, 2008, 08:06 AM   #1
pashik
macrumors member
 
Join Date: Jul 2008
IPhone: UITextField - how to set certain action for return key on keyboard

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.
pashik is offline   0 Reply With Quote
Old Jul 16, 2008, 08:08 AM   #2
white89gt
macrumors regular
 
Join Date: Jan 2006
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.
white89gt is offline   0 Reply With Quote
Old Jul 16, 2008, 08:39 AM   #3
pashik
Thread Starter
macrumors member
 
Join Date: Jul 2008
Quote:
Originally Posted by white89gt View Post
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.
pashik is offline   0 Reply With Quote
Old Jul 17, 2008, 04:07 AM   #4
pashik
Thread Starter
macrumors member
 
Join Date: Jul 2008
here is code which works:
Code:
// UITextFieldDelegate

- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
	[theTextField resignFirstResponder];
	if(theTextField = myPasswordTextField)
	   [self onLoginButtonClicked];
	return YES;
}
pashik is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How to set certain text to the clipboard through Applescript? rebello95 Mac Programming 6 Nov 9, 2011 09:42 AM
Noob question, how to start terminal from a custom key Weemen Mac Basics and Help 2 Nov 9, 2010 02:25 AM
iTunes - how to set up for different users? DHart Mac Applications and Mac App Store 2 Mar 25, 2009 03:40 PM
FTP server on X.2 - How to set it up????? macgroove Mac Applications and Mac App Store 6 Oct 14, 2003 05:36 AM
FTP server on X.2 - How to set it up????? macgroove General Mac Discussion 0 Oct 13, 2003 09:05 AM


All times are GMT -5. The time now is 07:07 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC