Last active
January 1, 2016 03:49
-
-
Save matthiaswenz/8088229 to your computer and use it in GitHub Desktop.
UISearchBar customize Keyboard Return button type (iOS 7)
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
for (UIView *subview in searchBar.subviews) { | |
for (UIView *subSubview in subview.subviews) { | |
if ([subSubview conformsToProtocol:@protocol(UITextInputTraits)]) { | |
UIView<UITextInputTraits> *textInputField = (UIView<UITextInputTraits> *)subSubview; | |
textInputField.returnKeyType = UIReturnKeyDone; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment