How can I change the font size and font style of UISearchBar in iOS 7?
UITextField *textField = [[searchBar subviews] objectAtIndex:1]; [textField setFont:[U
For Swift 4 you need to reference the NSAttributedStringKey enum:
NSAttributedStringKey
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]) .defaultTextAttributes = [NSAttributedStringKey.font.rawValue: UIFont(...)]