简体   繁体   中英

How to change ABPeoplePickerNavigationController backButton color?

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?

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];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM