Search code examples
iosuisearchbarplaceholder

UISearchBar change placeholder color


Has anyone any idea or code sample on how can I change the text color of the placeholder text of a UISearchBar?


Solution

  • for iOS5+ use the appearance proxy

    [[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor redColor]];