Search code examples
iosswiftuisearchbaruisearchcontroller

How can I change the text color of a UISearchBar's cancel button?


I have a UISearchController in my iOS app. When the user taps on its UISearchBar the keyboard pops up and a cancel button is presented. How can change the text color of the cancel button?


Solution

  • Just set the tint color of the search bar. :) As simple as that.