Permalink
Browse files

Fixed navigation bar position when hidden and device is rotated.

  • Loading branch information...
kirbyt committed Nov 18, 2010
1 parent 93b5d10 commit ee4fd9a71dd50767d122f04ad79f2b3addaac8f2
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/KTPhotoBrowser/KTPhotoScrollViewController.m
@@ -413,6 +413,14 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte
[self layoutScrollViewSubviews];
// Rotate the toolbar.
[self updateToolbarWithOrientation:toInterfaceOrientation];
+
+ // Adjust navigation bar if needed.
+ if (isChromeHidden_ && statusbarHidden_ == NO) {
+ UINavigationBar *navbar = [[self navigationController] navigationBar];
+ CGRect frame = [navbar frame];
+ frame.origin.y = 20;
+ [navbar setFrame:frame];
+ }
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

0 comments on commit ee4fd9a

Please sign in to comment.