Hello Everyone,
I have made an application in which user enters data in text field and it is displayed on table view cell. I also saved the entered data using NSDefault but in every cell after data entering a custom button named edit appears. But when I close the application so the button does not appear in the cell and just the data appears. I also tried to save it but it didn't work. Here is the code in the new item adding method:
Code:
NSUserDefaults *bDefaults= [NSUserDefaults standardUserDefaults];
[bDefaults setBool:but2.hidden forKey:@"editBut"];
[bDefaults synchronize];
and in viewDidLoadMethod:
Code:
but2.hidden = [[NSUserDefaults standardUserDefaults] boolForKey:@"editBut"];
Did I do anything wrong? Please help anyone.
Thanks