Browse Source

Fix : Application tried to present modally an active controller

Marino Faggiana 7 years ago
parent
commit
d806f6d4dc
1 changed files with 11 additions and 2 deletions
  1. 11 2
      iOSClient/Main/CCMain.m

+ 11 - 2
iOSClient/Main/CCMain.m

@@ -5811,8 +5811,17 @@
         
         } else {
            
-            if (viewController.isViewLoaded)
-                [self.navigationController pushViewController:viewController animated:YES];
+            if (viewController.isViewLoaded) {
+                
+                // Fix : Application tried to present modally an active controller
+                if ([self.navigationController isBeingPresented]) {
+                    // being presented
+                } else if ([self.navigationController isMovingToParentViewController]) {
+                    // being pushed
+                } else {
+                    [self.navigationController pushViewController:viewController animated:YES];
+                }
+            }
         }
     }
 }