I need to login from the first view controller by entering email and should navigate to the second view controller. The entered email in first view controller has to be displayed.
Until this, it is working fine. My problem is, even after I close the app completely, next time when I open app, it should show me the second view controller displaying the saved email. Can anyone help me out please?
Save your login details in NSUserDefaults and after landing again check if email is already exit then show second controller and show same mail using NSUserDefaults
On Login action save like this
[[NSUserDefaults standardUserDefaults] setValue:@"Your email" forKey:@"emailId"];
[[NSUserDefaults standardUserDefaults] synchronize];
On First controller Check on again Load
NSString *emailStr = [[NSUserDefaults standardUserDefaults] valueForKey:@"emailId"];
if(emailStr.length != 0){
//Send to next controller and show email Id
}