Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[MGSplitViewController shouldAutorotateToInterfaceOrientation:] overrides autorotate settings defined in the detail view controller. #26

Merged
merged 1 commit into from

5 participants

@cvee

[MGSplitViewController shouldAutorotateToInterfaceOrientation:] currently returns YES for all orientations. If custom autorotate settings are defined in the detail view controller (for example Landscape only), MGSplitViewController ignores these settings and continues to autorotate for all orientations.

The patch modifies [MGSplitViewController shouldAutorotateToInterfaceOrientation:] to return the value of [detailViewController shouldAutorotateToInterfaceOrientation:] if detailViewController is available. Otherwise, it defaults to YES.

@cvee cvee Fixed issue where [MGSplitViewController shouldAutorotateToInterfaceO…
…rientation:] would ignore autorotate settings defined in the detail view controller.
0d2d9cb
@jpm
jpm commented

+1 on this one.

@raid5

+1 Why is this still not merged in? Such a useful and easy update.

@tobiaszuercher

+1, please merge that in!!

@mattgemmell mattgemmell merged commit d53f8de into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 6, 2010
  1. @cvee

    Fixed issue where [MGSplitViewController shouldAutorotateToInterfaceO…

    cvee authored
    …rientation:] would ignore autorotate settings defined in the detail view controller.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 Classes/MGSplitViewController.m
View
5 Classes/MGSplitViewController.m
@@ -165,6 +165,11 @@ - (void)dealloc
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
+ if (self.detailViewController)
+ {
+ return [self.detailViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
+ }
+
return YES;
}
Something went wrong with that request. Please try again.