更改1Password App扩展导航栏标题颜色

时间:2015-06-19 08:27:44

标签: ios uinavigationbar ios-app-extension uber-api

我正在尝试更改1Password App扩展程序中导航栏标题和状态栏项目的颜色。我无法找到办法。

请看下面的图片。 enter image description here

必须有办法做到这一点,优步应用程序正在这样做。请在下面找到图片。 enter image description here

有人可以建议我这样做。

2 个答案:

答案 0 :(得分:0)

更改navigationBar标题颜色:

self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor grayColor]};

更改状态栏字体颜色: 1.在Info.plist中添加项目:UIViewControllerBasedStatusBarAppearance NO enter image description here

2.添加[viewController viewDidLoad]

中的代码
  

提示:如果您需要更改所有viewController状态字体颜色,则应添加[AppDelegate application:didFinishLaunchingWithOptions:]

[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

答案 1 :(得分:0)

在呈现1Password屏幕之前,将外观设置如下。

[[UINavigationBar appearance] setBarTintColor:nil];
[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
[[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor blackColor]}];

在1Password的完成块中,将您的外观重置为应用程序的特定外观。