Search code examples
iphonexcode4uitableview

How to store information in a detailed view from a TableView


I have a bunch of information from a few views (stored in a singleton) that I collected from the user, now all displayed in one confirmation view. How do I take this information and create a new UITableViewCell that one can click on to see the entered information.

And, although this comes later, how do I make sure this data is stored between sessions and never deleted unless done so by the user.

Thanks for the help.


Solution

  • Showing the data in a UITableView is quite trivial, and I suggest you check out the UITableView Class Reference, UITableViewDelegate and UITableViewDataSource protocols to find out how you can do that.

    For the storage of the data, one of the ways to do so is by using the NSUserDefaults.

    Once you have stored the user's data, you can access the NSUserDefaults from a different view without having to pass any objects between those views / controllers.