[英]Change 1Password App extension navigation bar title color
I am trying to change the color of navigation bar title and status bar items in 1Password App extension. 我正在尝试更改1Password App扩展中导航栏标题和状态栏项目的颜色。 I am unable to find a way to do it.
我找不到解决办法。
Please the image below. 请下图。
There must be a way to do it, Uber app is doing it. 必须有一种方法可以做到,Uber应用程序正在这样做。 Please find the image below.
请找到下面的图片。
Can some one please suggest me a way to do it. 有人可以建议我一种方法吗?
change navigationBar title color: 更改navigationBar标题颜色:
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor grayColor]};
change status bar font color: 1.in the Info.plist add item: UIViewControllerBasedStatusBarAppearance NO 更改状态栏字体颜色:1.在Info.plist中添加项目:UIViewControllerBasedStatusBarAppearance否
2.add the code in [viewController viewDidLoad] 2.在[viewController viewDidLoad]中添加代码
tip:if you need change all viewController status font color,you should add in [AppDelegate application:didFinishLaunchingWithOptions:]
提示:如果需要更改所有viewController状态字体颜色,则应添加[AppDelegate应用程序:didFinishLaunchingWithOptions:]
[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Before presenting 1Password screen set the appearance as follows. 在出现1Password屏幕之前,请如下设置外观。
[[UINavigationBar appearance] setBarTintColor:nil];
[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
[[UIBarButtonItem appearance] setTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor blackColor]}];
In completion block of 1Password reset your appearance to your app sepecific appearance. 在1Password的完成块中,将您的外观重置为应用程序的特定外观。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.