csotiriou csotiriou - 1 month ago 21
iOS Question

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?

Answer

for iOS5+ use the appearance proxy

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