Removing default iOS Search Bar Border


#1

On iOS, the search bar has a gray border and white text area by default, but I want to remove the gray border. I know that using searchBar.ios.searchBarStyle = UISearchBarStyle.Minimal can remove the gray border, but the remaining text area is semi-transparent instead of solid white. I’ve tried implementing sserdyuk’s solution in [https://github.com/NativeScript/NativeScript/issues/4319](this thread), but UISearchBarStyle.Prominent and UISearchBarStyle.UISearchBarStyleProminent don’t seem to do anything. Does anyone have a solution to this?


#2

I don’t see any issue, the solution given in the same Github comments just works.


#3

I tried that same code and it didn’t work for me. I’m using Angular, should that affect anything?


#4

Angular makes no difference, just make sure you are pointing to right context.


#5

Just got it, I realized that it’s because the search bar wasn’t nested inside a stack layout. Thanks for your help!