reloadData and UITableView/UINavigationBar

Discussion in 'Jailbreaks and iOS Hacks' started by river2sea, Jun 28, 2008.

  1. river2sea macrumors newbie

    Jun 28, 2008
    I have an iPhone app that uses the UINavigationBar. My initial view is a UITableView/UITableViewController. I click an 'add' button in the UINavigationBar to switch to a view to add an item to the table.

    What is the correct MVC way to tell my initial table view to reloadData when I navigate back to the initial table view using the UINavigationBar's automatically created back button.

    In the 'add' view, I can click 'Save' and this adds a new object to my domain model, which is being viewed as a table in the initial view. I'm not using any KVO at this point, just wondering if there is a hook in UINavigation's back button that will allow me to get the view controller I'm going back *to* so I can tell it to reload the table data.

  2. nownot macrumors regular

    Feb 25, 2007
    i believe the answer to your question is
    [self.navigationController popViewControllerAnimated:YES];
    at the end of your save method.

Share This Page