Browse Source

clear code

Marino Faggiana 7 years ago
parent
commit
fe776cb360
1 changed files with 4 additions and 5 deletions
  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