How does one change the background colour of the uisearchcontroller? Atm it looks like this
I want it all one colour. I've attempted sc.view.tintColor = UIColor.rgb(10, green: 150, blue: 255)
and sc.view.backgroundColor = UIColor.rgb(10, green: 150, blue: 255)
but doesn't remove the grey bit the side
呃,有些想法我解决了它。
sc.searchBar.barTintColor = UIColor.rgb(10, green: 150, blue: 255)
sc.searchBar.searchBarStyle = UISearchBarStyleProminent
sc.searchBar.backgroundImage = [UIImage new]
sc.searchBar.barTintColor = UIColor.rgb(10, green: 150, blue: 255)
set searchBarStyle to Prominent. It working for me
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.