Search code examples
iosiphoneios7

ABUnknownPersonVIewController and NavigationBarColor


I've converted an app from ios6 to ios7. The app sets the background color of the navigationbar in the following way.

[[UINavigationBar appearance] setBackgroundColor: [UIColor blueColor]];

This works fine almost everywhere. But when I use the ABUnknownPersonViewController and click "create new contact" or "add to existing contact" the header is white on white background.

Is there any way to change the navbar background color of this view?

The view is initiated like this

ABUnknownPersonViewController *picker = [[ABUnknownPersonViewController alloc] init];
picker.unknownPersonViewDelegate = self;
picker.displayedPerson = aContact;
picker.allowsAddingToAddressBook = YES;
picker.allowsActions = YES;
picker.alternateName = self.contact.fullName;
picker.title = self.contact.fullName;

[self.navigationController pushViewController:picker animated:YES];

The first view looks fine with the custom header/background color. It's when you click "add" or "create" that the header goes white.

Thanks

Johan


Solution

  • Try

    [[UINavigationBar appearance] setBarTintColor: [UIColor blueColor]];