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 3426474
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:43:13+00:00 2026-05-18T06:43:13+00:00

Sort of a simple question. I have a tableview in a navigationcontroller. When I

  • 0

Sort of a simple question. I have a tableview in a navigationcontroller. When I touch a cell, it pushes a view controller with the information from the cell, so I can edit it in the new view. Now thats working correct (we can call it the informationpath: “rootviewcontroller -> pushed viewcontroller”). But when I click save in the new view, I want the edited values to travel back to the rootviewcontroller before I call popviewcontroller (informationpath: “pushed viewcontroller -> rootviewcontroller”), so the edited values can be displayed in the tableview.

Whats the correct approach to this?

EDIT:

pushViewController and popViewController is working. I only asked for the best approach to get the edited information back to the rootViewController for display in the tableview, when Save-button (popViewController) was called. I guess I’ll just have to edit the pList with the new information directly from the pushed viewController. Though I would prefer sending the new information to the rootViewController and have it handle the access to the pList-file.

  • 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-18T06:43:13+00:00Added an answer on May 18, 2026 at 6:43 am

    I have the same situation – two tableviews. The first TV displays a list of database records and when one is tapped it goes through to the second TableView which displays the details of the record. I do this by pushing the details TableViewController onto the navigation controllers stack. So far so go and quite simple.

    The problem I encountered was that after updating the record in the details table view (controller), I wanted to let the list table view controller know, so that it could update the list of records.

    The first thing I did was to add a property to the details table view controller so that when a row was selected on the list of records, the list controller could pass the core data managed entity to the details controller.

    At the same time, I also added the list controller as a observer of core data change events like this:

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dataSaved:) name:NSManagedObjectContextDidSaveNotification object:nil];
    

    So if the details table view and controller update the record, the list controller has it’s dataSaved: method called, passing a NSNotification object.

    In the dataSaved: method I examine the object and if the core data entity being edited is in the updated list, then I set a flag to signal an update is required. However if there is a record in the inserted list, it means that a new record has been created and inserted into the database, so a flag is set to trigger a full reload of the list table view.

    When the user returns to the list view controller, the viewDidAppear: method is triggered. In this method I examine the flags and either call

    - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
    

    to reload the specific record if the record was updated, or tell the table view to do a full reload if there is an insert of a new record.

    Finally I then remove the list controller as an observer of core data notifications because it is no longer interested.

    I don’t know if this is the recommended way to do this, but so far it’s working for me.

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

Sidebar

Related Questions

EDIT The simple question is, how can I get Thread.CurrentPrincipal.Identity.Name to have the current
A seemingly simple question: Can I have some sort of Number object, which can
I have a simple question, not able to sort it out. I have a
This is a simple question: I know and have heard from almost everyone that
I have sort of a simple question. I am writing an Objective-C program with
I have a question that's so simple I cannot believe I can't answer it
I have a language-agnostic question about an algorithm. This comes from a (probably simple)
Sort of noob-rails question ;): I've got 2 actions in my controller - index
This is a fairly simple question, but it's one I can't find a firm
Greetings all... I have a simple, yet annoying question regarding Spring Web MVC. I

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.