Skip to content

Commit

Permalink
Fixed #175 which when you enter the search result and then click back…
Browse files Browse the repository at this point in the history
…, the left back button and the arrow move left.

Fixed #175 which when you enter the search result and then click back,
the left back button and the arrow move left.
  • Loading branch information
ko1o committed Jul 3, 2018
1 parent 5471382 commit 7ff3586
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PYSearch/PYSearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ - (void)viewDidLayoutSubviews
if (self.searchViewControllerShowMode == PYSearchViewControllerShowModePush) {
UIButton *backButton = self.navigationItem.leftBarButtonItem.customView;
adaptWidth = backButton.py_width;

} else if (self.searchViewControllerShowMode == PYSearchViewControllerShowModeModal) {
UIButton *cancelButton = self.navigationItem.rightBarButtonItem.customView;
self.cancelButtonWidth = cancelButton.py_width > self.cancelButtonWidth ? cancelButton.py_width : self.cancelButtonWidth;
Expand All @@ -148,7 +147,7 @@ - (void)viewDidLayoutSubviews
}
}
}
_searchBar.py_width = self.view.py_width - adaptWidth - PYSEARCH_MARGIN * 3 - 8;
_searchBar.py_width = self.view.py_width - adaptWidth - PYSEARCH_MARGIN * 4;
_searchBar.py_height = self.view.py_width > self.view.py_height ? 24 : 30;
_searchTextField.frame = _searchBar.bounds;
} else {
Expand Down

0 comments on commit 7ff3586

Please sign in to comment.