what's called after returning from presentModalViewController / dismissModalViewControllerAnimated:
Posted
by
Reinhard
on Stack Overflow
See other posts from Stack Overflow
or by Reinhard
Published on 2011-01-02T13:38:17Z
Indexed on
2011/01/02
13:54 UTC
Read the original article
Hit count: 182
to show a modal uiview out of my mainView I use:
[self presentModalViewController:myController animated:YES];
and in MyController I close that view with:
[self dismissModalViewControllerAnimated:YES];
But how can I know in the mainView that the modal was finished (to redraw my table)? Currently I set a local variable to YES in my mainView after starting the modal view an react on 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 so ?
© Stack Overflow or respective owner