Ok so I have a UITableView and a UINavigationController with a UIBarButtonSystemItemAdd and when the add button is pushed, it takes the user to a new view with some fields. I want to be able to get the information the user puts in these fields and display it in the table view. I want the user to be able to add as many of those items as they want.
Now that I think of it, kind of like the contacts app. The user fills out a contact and then when they go back to the main list, the new contact is there.
What is the best way to do this. I tried NSUserDefaults and a bunch of arrays, but that got really messy. Thanks.
A few ways I can think of handling this. The easiest and best way would be to use a model presentation of your view controller instead of pushing to it, much like the contact app on the iPhone does. That way you can access all your data needed with your tableview view controller instead of trying to pass it back and forth. once the user is finished with the creation view controller the model view is dismiss and you can add from your tableview. Developer doc: http://developer.apple.com/library/ios/ipad/#featuredarticles/ViewControllerPGforiPhoneOS/AboutViewControllers/AboutViewControllers.html%23//apple_ref/doc/uid/TP40007457-CH112-SW16