diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-26 22:05:14 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-26 22:05:14 -0700 |
commit | 40ac17f95458c9eaf684a11223db0fc00e198eb0 (patch) | |
tree | 04591a7017399bb5a59c9c0d200b7009aaa51b03 /CyteKit | |
parent | 3720d3d33be98b467736c5f2c2eb43b8afbc2e8c (diff) |
Implement shouldAutorotateTo*: using supported*s:.
Diffstat (limited to 'CyteKit')
-rw-r--r-- | CyteKit/ViewController.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index 80afb8e..b40ac6d 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; } |