What caused after returning from presentModalViewController / rejectModalViewControllerAnimated:

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?

+1
source share
1 answer

Generally speaking, it is not practical to reject a modal view by the modal representation itself.

. , . Objective-C.

btw, , . Xcode - . , .

+4

Source: https://habr.com/ru/post/1792761/


All Articles