Update ViewDeck/IIViewDeckController.m #143

Closed
wants to merge 1 commit into
from
@@ -638,6 +638,15 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return should;
}
+#ifdef __IPHONE_6_0
+- (NSUInteger)supportedInterfaceOrientations {
+ if (self.centerController) {
+ return [self.centerController supportedInterfaceOrientations];
+ }
+ return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskAllButUpsideDown;
+}
+#endif
+
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];