소스 검색

fix : Pushing the same view controller instance more than once is not supported

Marino Faggiana 7 년 전
부모
커밋
72cb0cd100
1개의 변경된 파일5개의 추가작업 그리고 12개의 파일을 삭제
  1. 5 12
      iOSClient/Main/CCMain.m

+ 5 - 12
iOSClient/Main/CCMain.m

@@ -5783,20 +5783,13 @@
             
             // save self
             [app.listMainVC setObject:viewController forKey:serverUrlPush];
-        }
-        
-        if (viewController) {
-                
-            // OFF SearchBar
-            [viewController cancelSearchBar];
+            
+            [self.navigationController pushViewController:viewController animated:YES];
         
-            @try {
+        } else {
+           
+            if (viewController.isViewLoaded)
                 [self.navigationController pushViewController:viewController animated:YES];
-            } @catch (NSException *e) {
-                NSLog(@"Exception: %@", e);
-            } @finally {
-                NSLog(@"Push View Controller %@", nomeDir);
-            }
         }
     }
 }