Skip to content

Commit

Permalink
Adapted Xcode9 iOS 11 version (#101)
Browse files Browse the repository at this point in the history
Fixed the display problem which search box moves right and covers the cancel button.
  • Loading branch information
刚子 authored and ko1o committed Aug 22, 2017
1 parent 24134eb commit 9704f35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions PYSearch/PYSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ - (void)viewDidLayoutSubviews
self.searchHistories = self.searchHistories;
self.currentOrientation = [[UIDevice currentDevice] orientation];
}

self.navigationItem.titleView.py_x = PYSEARCH_MARGIN * 2;
self.navigationItem.titleView.py_x = [[[UIDevice currentDevice] systemVersion] intValue] >= 11.0 ? PYSEARCH_MARGIN * 0.5 : PYSEARCH_MARGIN * 2.0;
self.navigationItem.titleView.py_y = self.view.py_width > self.view.py_height ? 3 : 7;
self.navigationItem.titleView.py_width = self.view.py_width - 44 - self.navigationItem.titleView.py_x * 2;
self.navigationItem.titleView.py_height = self.view.py_width > self.view.py_height ? 24 : 30;
Expand Down
2 changes: 2 additions & 0 deletions PYSearchExample/PYSearchExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PYSearchExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -505,6 +506,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = PYSearchExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down

0 comments on commit 9704f35

Please sign in to comment.