Browse files

Add simple rotation method for iOS6

  • Loading branch information...
1 parent 4fd8c13 commit ca967c5872785ac5e02300b0e9009b877a904fdd @myell0w myell0w committed Nov 7, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 JASidePanels/Source/JASidePanelController.m
View
10 JASidePanels/Source/JASidePanelController.m
@@ -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];

0 comments on commit ca967c5

Please sign in to comment.