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
 - (void)showDetailViewController:(UIViewController *)vc sender:(id)sender
 {
 {
     UINavigationController *ncDetail = (UINavigationController *)vc;
     UINavigationController *ncDetail = (UINavigationController *)vc;
-    
+    UINavigationController *ncMaster = [self.viewControllers.firstObject selectedViewController];
+
     if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassCompact) {
     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
             // Fix : Application tried to present modally an active controller
             if ([ncMaster isBeingPresented]) {
             if ([ncMaster isBeingPresented]) {
                 // being presented
                 // being presented