Skip to content

Commit

Permalink
Add simple rotation method for iOS6
Browse files Browse the repository at this point in the history
  • Loading branch information
myell0w committed Nov 7, 2012
1 parent 4fd8c13 commit ca967c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions JASidePanels/Source/JASidePanelController.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfa
}
}

- (BOOL)shouldAutorotate {
__strong UIViewController *visiblePanel = self.visiblePanel;

if (self.shouldDelegateAutorotateToVisiblePanel && [visiblePanel respondsToSelector:@selector(shouldAutorotate)]) {
return [visiblePanel shouldAutorotate];
} else {
return YES;
}
}

- (void)willAnimateRotationToInterfaceOrientation:(__unused UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
self.centerPanelContainer.frame = [self _adjustCenterFrame];
[self _layoutSideContainers:YES duration:duration];
Expand Down

0 comments on commit ca967c5

Please sign in to comment.