Hi I had created an UISearchController to search a tableview in my app, as I came to know that UISearchDisplay Controller methods are being deprecated for iOS 8, now everything works fine in the 8.1 simulator, when I was trying to run my App in iPad which is of ios version 7.1, I found the search bar missing so please me help how to create a search bar which supports all the iOS versions from 6.0
- (void)updateSearchResultsForSearchController:(UISearchController *)searchController {
UISearchBar *searchBar = searchController.searchBar;
if (searchBar.text.length > 0) {
NSString *text = searchBar.text;
NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(NSString *play, NSDictionary *dict) {
NSRange range = [play rangeOfString:text options:NSCaseInsensitiveSearch];
return range.location != NSNotFound;
}];
NSArray *searchResults = [self.dataARR filteredArrayUsingPredicate:predicate];