소스 검색

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