diff --git a/PYSearch/PYSearchSuggestionViewController.m b/PYSearch/PYSearchSuggestionViewController.m index 7b2d929..136e842 100644 --- a/PYSearch/PYSearchSuggestionViewController.m +++ b/PYSearch/PYSearchSuggestionViewController.m @@ -84,7 +84,7 @@ - (void)setSearchSuggestions:(NSArray *)searchSuggestions } self.tableView.contentOffset = CGPointMake(0, -self.tableView.contentInset.top); - if (@available(iOS 11.0, *)) { + if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0) { // iOS 11 self.tableView.contentInset = UIEdgeInsetsMake(-30, 0, 0, 0); } }