-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- if ([self parentViewController]) {
- return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
- } else {
- return [super shouldAutorotateToInterfaceOrientation:orientation];
- }
+- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
+ return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad || orientation == UIInterfaceOrientationPortrait);