浏览代码

Fix : Application tried to present modally an active controller

Marino Faggiana 7 年之前
父节点
当前提交
d806f6d4dc
共有 1 个文件被更改,包括 11 次插入2 次删除
  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];
+                }
+            }
         }
     }
 }