Well, I would suggest putting all the data from your text fields into an array and save this to a file, and then load it when you reopen the application.
The first thing you need is to save the file. This feature will create for you.
-(NSString*) saveFilePath{ NSString* path = [NSString stringWithFormat:@"%@%@", [[NSBundle mainBundle] resourcePath], @"myfilename.plist"]; return path;}
Now that this is done, you need to create your save array. I hope you have thousands of text fields that are already set to some sort of array. If not, it will be a painful process, no matter how you solve it. But anyway ... (Here labelArray will be an array of all your text fields / labels, etc.)
NSMutableArray* myArray = [[NSMutableArray alloc]init]; int i = 0; while(i < labelArray.count){ [myArray addObject: [labelArray objectAtIndex: i].text]; i ++; } [myArray writeToFile:[self saveFilePath] atomically:YES]; [myArray release];
And the download code will be something like lines
NSMutableArray* myArray = [[NSMutableArray arrayWithContentsOfFile:[self saveFilePath]]retain];
Then you simply load the data back into your array of text fields.
Hope this helps.
source share