Prevent navigation controller from pushing same view controller

This commit is contained in:
Gil Eluard
2021-01-14 10:57:12 +01:00
parent 810d9dde2f
commit 99602bf612

View File

@@ -55,4 +55,14 @@
return [super preferredInterfaceOrientationForPresentation];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if ([self.viewControllers indexOfObject:viewController] != NSNotFound)
{
NSLog(@"[RiotNavigationController] pushViewController: is pushing same view controller %@\n%@", viewController, [NSThread callStackSymbols]);
return;
}
[super pushViewController:viewController animated:animated];
}
@end