Created
January 8, 2019 15:24
-
-
Save JulienKode/52918fc189d94e24e6a1059de767e598 to your computer and use it in GitHub Desktop.
How to change the cancel button color of the search bar ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cancelButtonAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] | |
UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).setTitleTextAttributes(cancelButtonAttributes, for: .normal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment