Change 1Password App extension navigation bar title color

195 views Asked by At

I am trying to change the color of navigation bar title and status bar items in 1Password App extension. I am unable to find a way to do it.

Please the image below. enter image description here

There must be a way to do it, Uber app is doing it. Please find the image below. enter image description here

Can some one please suggest me a way to do it.

2

There are 2 answers

0
pavan309 On BEST ANSWER

Before presenting 1Password screen set the appearance as follows.

[[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.

3
skytoup On

change navigationBar title color:

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

change status bar font color: 1.in the Info.plist add item: UIViewControllerBasedStatusBarAppearance NO enter image description here

2.add the code in [viewController viewDidLoad]

tip:if you need change all viewController status font color,you should add in [AppDelegate application:didFinishLaunchingWithOptions:]

[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];