How can I change the font size and font style of UISearchBar in iOS 7?
UITextField *textField = [[searchBar subviews] objectAtIndex:1]; [textField setFont:[U
The accepted answer did not work for me on iOS 7.1. I had to change it to this:
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setDefaultTextAttributes:@{ NSFontAttributeName: [UIFont fontWithName:@"Avenir-Heavy" size:20.], }];