Last active
April 21, 2023 06:56
-
-
Save nonamelive/9334458 to your computer and use it in GitHub Desktop.
Prevent UINavigationController from pushing two view controllers at the same time in case of stack inconsistency and crashes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We had the same issue as @whychengxiaogang said, it will not enter push flow if swipe from edge to right for poping view controller but not actually pop, just be in middle state of pushing.
our workaournd: in view controller :
(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
staticMember.shouldIgnorePushingViewControllers = YES;
}
(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:NO];
staticMember.shouldIgnorePushingViewControllers = NO;
}