I try to set the bar color of a UISearchbar to one color and the tintColor (cursor and Cancel-Button) to another color with code like this:
searchbar.barTintColor = color1;
searchbar.tintColor = color2;
The barTintColor is applied correctly.
The problem is: The text of the cancel button is not visible but if try the same in storyboard (apply batTintColor and tintColor to a UISearchbar) everything works as expected.