Skip to content

Instantly share code, notes, and snippets.

@jagbolanos
Created July 2, 2012 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagbolanos/3036204 to your computer and use it in GitHub Desktop.
Save jagbolanos/3036204 to your computer and use it in GitHub Desktop.
Enable search button when empty text
- (void) enableSearchEmpty {
UITextField *searchBarTextField = nil;
for (UIView *subview in searchBar.subviews)
{
if ([subview isKindOfClass:[UITextField class]])
{
searchBarTextField = (UITextField *)subview;
break;
}
}
searchBarTextField.enablesReturnKeyAutomatically = NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment