From 40ac17f95458c9eaf684a11223db0fc00e198eb0 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 26 Oct 2014 22:05:14 -0700 Subject: Implement shouldAutorotateTo*: using supported*s:. --- CyteKit/ViewController.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CyteKit') 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; } -- cgit v1.2.3