Nav Link On

iPhone Dev Forums > General Development > SDK Coding Help > to pass cursor reference from one TextFiled to another

Reply

 

LinkBack Thread Tools Display Modes
Old 03-08-2010, 06:09 AM   #1 (permalink)
Junior Member
Default Avatar
 
Join Date: Mar 2010
Posts: 1
Default Navigation in TextField Inputs

Hello,

I am looking to make Entry page for different Data inputs. I have created Entry Page using Interface Builder and set attributes from that.

I have two questions on that.
1> Once data entered in First Text Field Input then if user press Next on keyboard then Cursor should go to Next TextFiled input box. How to do that ?
Means looking to send UIResponder Tasks to textFieldShouldReturn function.

2> Once all TextField Inputs are finished then how to add "save" button on Navigation Bar so Data Entry will be saved. Means How can I pass action to BarButtonItem to confirm all data entry.?

Is there any sample Code to under stand this type of functionality?

I have found one reference to implement textFieldShouldReturn routine to Navigate through testfield(Next/Done Buttons)
- (BOOL)textFieldShouldReturnUITextField *)textField {

NSInteger nextTag = textField.tag + 1;
UIResponder* nextResponder = [textField.superview viewWithTag:nextTag];

if (nextResponder) {
[nextResponder becomeFirstResponder];

}
else{

[textField resignFirstResponder];

}

return YES;

}
How to use this routine to work in file with different TextField Inputs?


Thanks,
rach

Last edited by rach; 03-09-2010 at 03:02 AM.
rach is offline   Reply With Quote
Reply

iPhone Dev Forums > General Development > SDK Coding Help


Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC1