瀏覽代碼

clear code

Marino Faggiana 7 年之前
父節點
當前提交
fe776cb360
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      iOSClient/Main/CCSplit.m

+ 4 - 5
iOSClient/Main/CCSplit.m

@@ -268,13 +268,12 @@
 - (void)showDetailViewController:(UIViewController *)vc sender:(id)sender
 {
     UINavigationController *ncDetail = (UINavigationController *)vc;
-    
+    UINavigationController *ncMaster = [self.viewControllers.firstObject selectedViewController];
+
     if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassCompact) {
         
-        if ([self.viewControllers[0] isKindOfClass:[UITabBarController class]]) {
-            
-            UINavigationController *ncMaster = [self.viewControllers[0] selectedViewController];
-            
+        if ([self.viewControllers.firstObject isKindOfClass:[UITabBarController class]]) {
+                        
             // Fix : Application tried to present modally an active controller
             if ([ncMaster isBeingPresented]) {
                 // being presented