0

I use ABPeoplePickerNavigationController to get all contacts. I change the tintColor with [[UIBarButtonItem appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setTintColor:[UIColor whiteColor]];, but when it push, the backItem <Contacts is still blue.

I tried this

`[[UIBarButtonItem appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setTintColor:[UIColor whiteColor]];`  
_picker.topViewController.navigationController.navigationBar.tintColor = [UIColor whiteColor];

and before push

[[UIBarButtonItem appearanceWhenContainedIn:[ABPersonViewController class], nil] setTintColor:[UIColor whiteColor]];,

it didn't work. How to change it?

magic_9527
  • 243
  • 3
  • 18
  • Appdelegate.m applicationDidFinishLaunch method set [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; – Muhammad Adnan Jun 25 '15 at 09:21
  • @MuhammadAdnan I have a custom MyTabController which has change the color with this method, I just want to change the `ABPeoplePickerNavigationController ` and its subControllers. – magic_9527 Jun 26 '15 at 01:50

1 Answers1

0

try with following code..

- (IBAction)btnopencontact {

    [[UINavigationBar appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setBarTintColor:[UIColor redColor]];
    ABPeoplePickerNavigationController *objPeoplePicker = [[ABPeoplePickerNavigationController alloc] init];
    [objPeoplePicker setPeoplePickerDelegate:self];
    [self presentViewController:objPeoplePicker animated:YES completion:nil];
}
Abhishek Sharma
  • 3,283
  • 1
  • 13
  • 22