最佳答案
如果你想在UISearchBar
的背景中设置黑色,那么尝试一下..
UISearchBar *searchbar=[[UISearchBar alloc]init];
searchbar.barTintColor = [UIColor blackColor];
关于ios - 选择文本字段时 UISearchBar 会更改背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37063564/