I'm updating my app for iOS 7 and one of my functions that allowed a search bar search button to be activated with no text in the search bar stopped working. I used the following code. ANy suggestions on how to make it work again? Thanks in advance.
UITextField *searchBarTextField = nil;
for (UIView *subview in self.searchBar.subviews)
{
if ([subview isKindOfClass:[UITextField class]])
{
searchBarTextField = (UITextField *)subview;
break;
}
}
searchBarTextField.enablesReturnKeyAutomatically = NO;