csotiriou csotiriou - 1 year ago 108
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 Source

for iOS5+ use the appearance proxy

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