/*h file:*/
IBOutlet UITextField *Number;
/*m File:*/
[(Number) setText: [[NSUserDefaults standardUserDefaults]
stringForKey:@"SBFormattedPhoneNumber"]];
Any idea why this is not working ?
Thanks
/*h file:*/
IBOutlet UITextField *Number;
/*m File:*/
[(Number) setText: [[NSUserDefaults standardUserDefaults]
stringForKey:@"SBFormattedPhoneNumber"]];
Any idea why this is not working ?
Thanks
You probably have an empty or nil string as under that key.
Add this statement to check:
NSLog(@"%@", [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"]);
Should read:
NSString * savedNumber = [[NSUserDefaults standardUserDefaults]
stringForKey:@"SBFormattedPhoneNumber"];
if (savedNumber)
{
[Number setText:savedNumber];
}