我有UISearchBar
,并且在Xcode编辑器和代码中都将Translucent
属性设置为false
。
但是UISearchBar
始终保持半透明,并且在我的导航栏旁边也很糟糕,我也将Translucent
设置为false
。
如何设置UiSearchBar
的条形颜色而不是半透明的?
Rant : 为什么地球上iOS不允许您完全根据需要设置组件的颜色?悄悄地改变背景颜色!
修改
将半透明设置为false的代码。
historySearchBar.Translucent = false;
设计器设置为半透明。
结果仍然是半透明的UISearchBar。