help me

13 views
Skip to first unread message

shraddha chavan

unread,
May 14, 2012, 2:26:35 AM5/14/12
to iPhone-BitCode
hello friends,
I have two views in which first view contain one textfield and
button.
When i click on button then next view appears which is table view, on
selection of row from that table that value must get assign to
textfield which is in previous view.

Bharat Jagtap

unread,
May 14, 2012, 9:59:04 AM5/14/12
to iphone-...@googlegroups.com
Set the selected values from the second table view in user defaults as below

[[NSUserDefaults standardUserDefaults] setObject:@"selected value" forKey:@"key"];


Then in access that and set it to text field in the viewWillAppear method of the first view Controller as  below

-( void ) viewWillAppear:(BOOL)animated
{

 textField.text  = [[NSUserDefaults standardUserDefaults] objectForKey:@"key"];

}

Shraddha Chavan

unread,
May 14, 2012, 11:49:09 PM5/14/12
to iphone-...@googlegroups.com
Thank you sir...
> --
> BitCode Technologies Pvt. Ltd.
> Find more about us at: http://www.bitcode.in
> Check out the iPhone Tutorials : http://www.iphone-bitcode.blogspot.com
>
> For more options, visit this group at
> http://groups.google.com/group/iphone-bitcode?hl=en
Reply all
Reply to author
Forward
0 new messages