diff --git a/Classes/MGSplitViewController.m b/Classes/MGSplitViewController.m index 61b30a6..320ce7c 100644 --- a/Classes/MGSplitViewController.m +++ b/Classes/MGSplitViewController.m @@ -165,7 +165,15 @@ - (void)dealloc - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return YES; + if (self.masterViewController && self.detailViewController) { + return [self.masterViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation] && [self.detailViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } else if (self.masterViewController) { + return [self.masterViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } else if (self.detailViewController) { + return [self.detailViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; + } else { + return YES; + } }