I've home view controller shown in image 1.
When user clicks on bar button another view controller is presented using presentViewController:
method. This is CNContactPickerViewController
which is completely native (shown in image 2).
How to change the color of UINavigationBar for this controller? I've tried below approach but didn't worked :
- Changed navigation bar color in Appdelegate
- Changed navigation bar color in global file that is inherited by controller.
I've used below code :
[self.navigationBar setTranslucent:NO];
[self.navigationBar setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackground"]
forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
[self.navigationBar setShadowImage:[UIImage new]];
[self.navigationBar setTintColor:kBlackColor];
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor blackColor], NSForegroundColorAttributeName,nil]];
Also, when I run the app on device iPhone 6S iOS 9.3.2 the CNContactPickerViewController doesn't shows group button on navigation bar as shown in simulator.
How to change color of Cancel button on CNContactPickerViewController
?
I've got answer to above question. Now, the pending thing is how to change color of tableview section as well as cell of CNContactPickerViewController
.