소스 검색

Forward shouldAutorotate in addition to supportedInterfaceOrientations.

We want the app to fully control rotation behavior regardless of whether FLEX is presented or not.
Ryan Olson 12 년 전
부모
커밋
190e5336f7
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      Classes/Explorer Toolbar/FLEXExplorerViewController.m

+ 10 - 0
Classes/Explorer Toolbar/FLEXExplorerViewController.m

@@ -184,6 +184,16 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     return supportedOrientations;
     return supportedOrientations;
 }
 }
 
 
+- (BOOL)shouldAutorotate
+{
+    UIViewController *viewControllerToAsk = [self viewControllerForStatusBarAndOrientationProperties];
+    BOOL shouldAutorotate = YES;
+    if (viewControllerToAsk && viewControllerToAsk != self) {
+        shouldAutorotate = [viewControllerToAsk shouldAutorotate];
+    }
+    return shouldAutorotate;
+}
+
 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
 {
 {
     for (UIView *outlineView in [self.outlineViewsForVisibleViews allValues]) {
     for (UIView *outlineView in [self.outlineViewsForVisibleViews allValues]) {