I have a simple form on a web page. I've got an ipad that is going to be used in a room with开发者_如何学Python no 3g or internet connection.
How can I store the results of all the data that is submitted through the form, so that later, i can just download that data or export it somewhere?
What's the quickest way?
without having to recreate the entire form in xcode?
Jason
With such little data to store, NSUserDefaults is probably the way to go.
Save a string:
[[NSUserDefaults standardUserDefaults] setObject:@"TextToSave" forKey:@"keyToLookupString"]];
Retrieve a string:
NSString *myString = [[NSUserDefaults standardUserDefaults] stringForKey:@"keyToLookupString"];
How are you going to serve the web page with no internet connection? Are you including it in an App then using WebView to display it? If so you should be able to use something like SQLite to save the data, then later have an "administrator" side where you can view the entrees in the Database.
精彩评论