I am facing issue to set bg color of UISearchBar as White. I have tried to set bg as white but still default gray bg color is there. I tried this code.
searchController?.searchBar.searchTextField.backgroundColor = UIColor.white
I dont understand what's wrong. Bcz when i set any color like green or red, they are set easily. Please provide answer in Swift 4+ .