]> git.saurik.com Git - cydia.git/commitdiff
Implement shouldAutorotateTo*: using supported*s:.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 27 Oct 2014 05:05:14 +0000 (22:05 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 27 Oct 2014 05:05:14 +0000 (22:05 -0700)
CyteKit/ViewController.mm

index 80afb8e15e982fe6456a6a8f22dc77e5f6a8ece1..b40ac6de3b1a2cda1f2e08211ca4919137be3099 100644 (file)
@@ -108,14 +108,14 @@ extern bool IsWildcat_;
     return nil;
 }
 
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
-}
-
 - (NSUInteger) supportedInterfaceOrientations {
     return IsWildcat_ ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait;
 }
 
+- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
+    return ([self supportedInterfaceOrientations] & 1 << orientation) != 0;
+}
+
 - (BOOL) shouldAutorotate {
     return YES;
 }