Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6165657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:12:14+00:00 2026-05-23T22:12:14+00:00

I have a UITableView and its a checklist. I can add new cells to

  • 0

I have a UITableView and its a checklist. I can add new cells to the table and you can also delete them. I want to know how to save the tables data when someone leaves/exits a view! Is this possible?Thanks everyone: D

I am using this to save the data:: would this work?

 NSArray *sourceData = [[NSUserDefaults standardUserDefaults] arrayForKey:@"funds"];


if (!sourceData)
{
    NSString * myFile = [[NSBundle mainBundle]pathForResource:@"cells" ofType:@"plist"];
    sourceData = [[NSMutableArray alloc]initWithContentsOfFile:myFile];
}



self.cells = [NSMutableArray array];


for (NSDictionary *immutableCellDictionary in sourceData)
{
    [self.cells addObject:[NSMutableDictionary   
dictionaryWithDictionary:immutableCellDictionary]];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:12:16+00:00Added an answer on May 23, 2026 at 10:12 pm

    It all depends on what you mean by exiting/leaving a view. One option is using viewWillDisappear:

    viewWillDisappear:

    Notifies the view controller that its view is about to be dismissed, covered, or otherwise hidden from view.

    Subclasses can override this method and use it to commit editing changes, resign the first responder status of the view, or perform other relevant tasks.

    If this is not fine with your app, please give some more detail about when exactly you want to save the view data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UItableView I can add and delete cells. I can change the
I have a UITableView and I want some cells to be the standard UITableViewCells
I have a UITableView with 8 cells(sections) in total in which 6 of them
I have a UITableView with transparent background color, each of its cells have a
I have some table cells displaying different time. I want the time to be
I have a regular UITableViewController and a UITableView as its only view, and I
I have a UIPopOverController that shows a UIViewController with a UITableview in its view.
I have a uiwebview that sends its loaded page url to a uitableview to
I have UITableView with very large cells with lots of content (more than one
So I have a UITableView where one of its rows is a UITextView. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.