ios - How to change the color of the UISearchBar Icon? -


i don't know how modify original searchicon's color.

enter image description here

you can use custom image of white search icon, search bar not modify supplied image. set custom image, use method. (link documentation.)

- (void)setimage:(uiimage *)iconimage forsearchbaricon:(uisearchbaricon)icon            state:(uicontrolstate)state; 

example code:

[searchbar setimage:[uiimage imagenamed:@"searchicon"]    forsearchbaricon:uisearchbariconsearch               state:uicontrolstatenormal]; 

in swift:

searchbar.setimage(uiimage(named: "searchicon"), for: .search, state: .normal) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

c# - System.FormatException' occurred in MongoDB.Bson.dll - XXX is not a valid 24 digit hex string -