Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update ViewDeck/IIViewDeckController.m

Added support for new autorotation methods. If we have a center controller, let it decide, otherwise use the standard idioms for either platform.
  • Loading branch information...
commit 6d8b33331b7c181e5bab36b3f917cb291533916f 1 parent 922f690
@brianmichel authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 ViewDeck/IIViewDeckController.m
View
9 ViewDeck/IIViewDeckController.m
@@ -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];

2 comments on commit 6d8b333

@Inferis

Why not call super?

@brianmichel

You're right, the return at the end should just call super.

Please sign in to comment.
Something went wrong with that request. Please try again.