marinofaggiana 4 年之前
父節點
當前提交
f68d477646
共有 1 個文件被更改,包括 20 次插入15 次删除
  1. 20 15
      iOSClient/AppDelegate.m

+ 20 - 15
iOSClient/AppDelegate.m

@@ -420,26 +420,31 @@
 -(void)showLoginViewController:(UIViewController *)viewController forContext:(UIViewController *)contextViewController
 -(void)showLoginViewController:(UIViewController *)viewController forContext:(UIViewController *)contextViewController
 {
 {
     if (contextViewController == NULL) {
     if (contextViewController == NULL) {
-        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
-        navController.navigationBar.barStyle =  UIBarStyleBlack;
-        navController.navigationBar.tintColor = NCBrandColor.sharedInstance.customerText;
-        navController.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer;
-        [navController.navigationBar setTranslucent:false];
-        self.window.rootViewController = navController;
+        
+        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
+        navigationController.navigationBar.barStyle =  UIBarStyleBlack;
+        navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.customerText;
+        navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer;
+        [navigationController.navigationBar setTranslucent:false];
+        self.window.rootViewController = navigationController;
+        
         [self.window makeKeyAndVisible];
         [self.window makeKeyAndVisible];
         
         
     } else if ([contextViewController isKindOfClass:[UINavigationController class]]) {
     } else if ([contextViewController isKindOfClass:[UINavigationController class]]) {
-        UINavigationController *navController = ((UINavigationController *)contextViewController);
-        [navController pushViewController:viewController animated:true];
+        
+        UINavigationController *navigationController = ((UINavigationController *)contextViewController);
+        [navigationController pushViewController:viewController animated:true];
         
         
     } else {
     } else {
-        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
-        navController.modalPresentationStyle = UIModalPresentationFullScreen;
-        navController.navigationBar.barStyle =  UIBarStyleBlack;
-        navController.navigationBar.tintColor = NCBrandColor.sharedInstance.customerText;
-        navController.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer;
-        [navController.navigationBar setTranslucent:false];
-        [contextViewController presentViewController:navController animated:true completion:nil];
+        
+        UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
+        navigationController.modalPresentationStyle = UIModalPresentationFullScreen;
+        navigationController.navigationBar.barStyle =  UIBarStyleBlack;
+        navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.customerText;
+        navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer;
+        [navigationController.navigationBar setTranslucent:false];
+        
+        [contextViewController presentViewController:navigationController animated:true completion:nil];
     }
     }
 }
 }