Reputation:
I have a question on how can i use core date to update my formula. I have tried using NSUserDefault but the formula is blank (its saves though). So I have two textfields which needs to update my formula. And when the user quits the app the two textfield date needs to be saved. So how should I approach this way…..
Upvotes: 0
Views: 159
Reputation: 40221
Saving the content of a text field to the user defaults:
[[NSUserDefaults standardUserDefaults] setObject:field1.text forKey:@"field1"];
[[NSUserDefaults standardUserDefaults] synchronize];
Loading the content of a text field from the user defaults:
[[NSUserDefaults standardUserDefaults] synchronize];
field1.text = [[NSUserDefaults standardUserDefaults] stringForKey:@"field1"];
CoreData has little to do with saving simple things like that.
Upvotes: 2