I am trying to set the color of the UISearchbar to one color, and tintColor (cursor and cancel button) to a different color with a code like this:
searchbar.barTintColor = color1; searchbar.tintColor = color2;
The TintColor bar is applied correctly.
The problem is that the cancel button text is not displayed, but if you try to do the same in the storyboard (apply batTintColor and tintColor to the UISearchbar), everything works as expected.
ios7 uisearchbar tintcolor
mhaddl
source share