CNContactPickerViewController – UISearchBar looks black in colour and entered text not visible

Setting search bar background colour will fix the issue, but cancel button is not visible in edit mode due to cancel button text is in white colour. The cancel button will be visible when we set the tint colour for label.

  • [[UISearchBar appearance] setBackgroundColor:[UIColor whiteColor]];
  • [[UILabel appearanceWhenContainedInInstancesOfClasses:@[UISearchBar.class]] setTintColor:[UIColor blueButtonColor]];
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: