0
votes

I am excuting the following line to add a Detail Viwe after my Table View is loaded:

if (!self.addView) {
        self.addView = [[AddView alloc] initWithNibName:@"AddView" bundle:nil];
    }
          [self.navigationController pushViewController:self.addView animated:YES];
    NSLog(@"I am done, now what");

Then I am presented with a screen of text boxes... I enter data and I save to a plist... then to return Programatically, i perform the following line:

[self.navigationController popToRootViewControllerAnimated:NO];

My question is how to I refresh the tableview with the new record? I know it is in viewWillAppear method [self.tableview reloadData], but how do I trigger the viewWillAppear, as it is not gettin to that method after return? any help would be appreciated. Regards,

2

2 Answers

0
votes

If you want to run reloadData every time your tableView is about to appear you can run [self.tableview reloadData] in viewWillAppear.

0
votes

You probably want to put the [self.tableView reloadData] in the viewWillAppear method instead of the viewDidLoad method.