From: Jay Freeman (saurik) Date: Mon, 27 Oct 2014 05:05:14 +0000 (-0700) Subject: Implement shouldAutorotateTo*: using supported*s:. X-Git-Tag: v1.1.14~31 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/40ac17f95458c9eaf684a11223db0fc00e198eb0?hp=3720d3d33be98b467736c5f2c2eb43b8afbc2e8c Implement shouldAutorotateTo*: using supported*s:. --- diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index 80afb8e1..b40ac6de 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -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; }