I have implemented a UITableView
in VC1 to display firstName and LastName of the user,and a edit Button at the top of the UITableView
. When the user presses the button it navigates through navigation controller to VC2.
In VC2 the user can update the firstName
and LastName
Fields. I am saving the details Using NSUserDefaults
as
NSUserDefaults*first=[NSUserDefaults standardUserDefaults];
[first setValue:textField1.text forKey:@"firstname"];
While I go back to VC1 and try to display the updated data its not working why is it so...?
NSUserDefaults*first=[NSUserDefaults standardUserDefaults];
cell.detailTextLabel.text=[first valueForKey:@"firstname"];
How can I do it using NSUserDefaults
.?