Open thaiduy opened 8 years ago
Finally I make it working by setting UINavigationController
's transitioningDelegate
to ViewController
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
UINavigationController *nav = segue.destinationViewController;
if (nav && [nav isKindOfClass:[UINavigationController class]]) {
ModalViewController *desVC = nav.viewControllers[0];
nav.transitioningDelegate = self;
[desVC setInteractor:_interactor];
}
}
But when I drag the ModalViewController
around without completely dismissing it for some times, the UI get frozen, no logs, no errors message, nothing on the console window.
ViewController --(present modally segue)--> ModalViewController
ViewController --(present modally segue)--> UINavigationController --(relationship root view controller)--> ModalViewController
In case (1),
panGestureRecognizer
will return all available states: Began, Changed, Cancelled, Ended. But in case (2), it will only return Began and Cancelled. Do you have any idea why it happened and how to fix it?Thank you!