我正在尝试更改1Password App扩展程序中导航栏标题和状态栏项目的颜色。我无法找到办法。
请看下面的图片。
必须有办法做到这一点,优步应用程序正在这样做。请在下面找到图片。
有人可以建议我这样做。
答案 0 :(得分:0)
更改navigationBar标题颜色:
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor grayColor]};
更改状态栏字体颜色: 1.在Info.plist中添加项目:UIViewControllerBasedStatusBarAppearance NO
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的完成块中,将您的外观重置为应用程序的特定外观。