I'd like to change the text from "Cancel" to "Done" of the Cancel button inside the UISearchBar in iOS 8. I am using UISearchController. I've tried different approaches for iOS 6 and iOS 7 and they do not work. Has anybody done this?
UISearchBar
UISearchController
Objective-C:
[searchBar setValue:@"customString" forKey:@"_cancelButtonText"];
Swift:
searchBar.setValue("customString", forKey:"_cancelButtonText")
1.4m articles
1.4m replys
5 comments
57.0k users