فهرست منبع

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);
-            }
         }
     }
 }