My app has one big problem. Mainly on iOS 8 because we have not found this on other iOS versions.
It will freeze sometimes when push to a new view controller or pop to a previous view controller. But something strange is if you press home button and launch the app from background. It will run a little. Here I mean the new pushed or popped view controller appeared but you still could not push or pop new view controllers.
update: The memory, CPU and disk usage are all normal when the app freeze.
We have solved this problem finally. The reason is we have not disabled the interactivePopGestureRecognizer
when the view controller stack have only 1 view controller. Add the check will solve the problem. See code bellow.
- (void)navigationController:(UINavigationController *)navigationController
didShowViewController:(UIViewController *)viewController
animated:(BOOL)animate
{
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)])
{
if (self.viewControllers.count > 1)
{
self.interactivePopGestureRecognizer.enabled = YES;
}
else
{
self.interactivePopGestureRecognizer.enabled = NO;
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With