I have two viewcontrollers. In my first viewcontroller:
{
NSString *string=textField.text;
NSUserDefaults *data = [NSUserDefaults standa
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
NSString *myString = [defaults stringForKey:@"strings"];
THis is the way to retrieve the data. Please note NSUserDefault is not used to pass data between two controllers. There are better methods for that.
Edit : After seeing Shaan Singh's comment
To pass data 2 view controllers you can declare a property in second view controller and access that from the present view controller.
It is already answered brilliantly here.