I have an application where I have two textfields and a button. In the first textfield I am entering the username of the user and in the second textfield I am entering the p
You can use NSUserDefaults saving locally it. following code is for saving data.
perf = [NSUserDefaults standardUserDefaults];
[perf setObject:@"1" forKey:@"remember"];
[perf setObject:emailAddresTextField.text forKey:@"email"];
[perf setObject:passwordTextField.text forKey:@"password"];
[perf synchronize];
And for retrieving data use following code
perf=[NSUserDefaults standardUserDefaults];
NSString *remString = [perf stringForKey:@"remember"];
if ([remString isEqualToString:@"1"]) {
emailAddresTextField.text=[perf stringForKey:@"email"];
passwordTextField.text = [perf stringForKey:@"password"];
[rememberBtn setTag:1];
[rememberBtn setImage:[UIImage imageNamed:@"on_radioButton.png"] forState:0];
}