Skip to content

Commit

Permalink
Fixed orientation changing methods to update navigation items.
Browse files Browse the repository at this point in the history
  • Loading branch information
devedbox committed Feb 17, 2017
1 parent 71f8db2 commit e2ccf3b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ - (void)updateToolbarItems {

- (void)updateNavigationItems {
[self.navigationItem setLeftBarButtonItems:nil animated:NO];
if (self.webView.canGoBack) {// Web view can go back means a lot requests exist.
if (self.webView.canGoBack/* || self.webView.backForwardList.backItem*/) {// Web view can go back means a lot requests exist.
UIBarButtonItem *spaceButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
spaceButtonItem.width = -6.5;
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
Expand Down Expand Up @@ -1383,6 +1383,9 @@ - (void)hookWebContentCommitPreviewHandler {
}

- (void)orientationChanged:(NSNotification *)note {
// Update tool bar items of navigation tpye is tool item.
if (_navigationType == AXWebViewControllerNavigationToolItem) { [self updateToolbarItems]; return; }
// Otherwise update navigation items.
[self updateNavigationItems];
}
@end
Expand Down

0 comments on commit e2ccf3b

Please sign in to comment.