Created
July 21, 2014 11:35
-
-
Save sag333ar/2dc9e9f211b438a5cc06 to your computer and use it in GitHub Desktop.
Change appearance of UISearchBar Keyboard.
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
+ (void)changeSearchBarColor:(UISearchBar *)searchBar { | |
for (UIView *subview in searchBar.subviews) { | |
for (UIView *subSubview in subview.subviews) { | |
if ([subSubview conformsToProtocol:@protocol(UITextInputTraits)]) { | |
UITextField *textField = (UITextField *)subSubview; | |
[textField setKeyboardAppearance: UIKeyboardAppearanceAlert]; | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment