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,
如果要在每次tableView即将出现时都运行reloadData,则可以在viewWillAppear中运行[self.tableview reloadData]。
您可能希望将[self.tableView reloadData]
放在viewWillAppear
方法中,而不是viewDidLoad
方法中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.