此问题仅在 iPhone 5 上出现,无论 iOS 版本如何。
- 我从这次呈现的 firstViewController 中呈现 secondViewController。
- 然后我解雇了 secondViewController。
- 我尝试从 firstViewController 再次呈现 secondViewController,这次它没有呈现但 UI 被阻止,
通过记录该过程,我可以看到第一次调用 viewWillAppear 方法,但没有第二次调用该方法。
第一视图控制器
- (void)presentView {
SecondViewController *secondViewController = [[SecondViewController alloc] init];
secondViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:secondViewController animated:YES completion:nil];
}
第二视图控制器
- (void)dismissView {
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}