to show the modal uiview from my mainView, which I use:
[self presentModalViewController:myController animated:YES]
and in MyController I close this view with:
[self dismissModalViewControllerAnimated:YES]
But how can I find out in mainView that the modal is finished (to redraw my table)? Currently, I set a local variable in YES in my mainView after starting a modal view that responds to viewWillAppear:
[self presentModalViewController:myController animated:YES];
_reloadTableData = YES;
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (_reloadTableData) {
_reloadTableData = NO;
[_tableView reloadData];
}
}
Is there a better way to do this?
source
share