From 52ef977792a46d434911f81020d16a26d22dee4d Mon Sep 17 00:00:00 2001 From: iphone5solo <499491531@qq.com> Date: Fri, 24 Nov 2017 15:47:23 +0800 Subject: [PATCH] Fixed #137 which `@available` compile failed in Xcode 7 Fixed #137 which `@available` compile failed in Xcode 7 --- PYSearch/PYSearchSuggestionViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }