浏览代码

Fix navbar theme for the future

Felix Paul Kühne 12 年之前
父节点
当前提交
1364c1934b
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9 3
      AspenProject/UINavigationController+Theme.m

+ 9 - 3
AspenProject/UINavigationController+Theme.m

@@ -14,8 +14,14 @@
 - (void)loadTheme
 {
     UINavigationBar *navBar = self.navigationBar;
-    [navBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"]
-                 forBarMetrics:UIBarMetricsDefault];
-    navBar.barStyle = UIBarStyleBlack;
+    if (!SYSTEM_RUNS_IN_THE_FUTURE) {
+        [navBar setBackgroundImage:[UIImage imageNamed:@"navBarBackground"]
+                     forBarMetrics:UIBarMetricsDefault];
+        navBar.barStyle = UIBarStyleBlack;
+    } else {
+        navBar.barTintColor = [UIColor colorWithRed:1.0f green:(132.0f/255.0f) blue:0.0f alpha:1.f];
+        navBar.tintColor = [UIColor whiteColor];
+        navBar.titleTextAttributes = @{ UITextAttributeTextColor : [UIColor whiteColor] };
+    }
 }
 @end