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