X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/323746d39bfa3830194974658233d0b45809b060..ccf4005a8ed109b527637527254a7b56aae47d6f:/CyteKit/ViewController.mm diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index a0365956..b40ac6de 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -1,5 +1,5 @@ /* Cydia - iPhone UIKit Front-End for Debian APT - * Copyright (C) 2008-2013 Jay Freeman (saurik) + * Copyright (C) 2008-2014 Jay Freeman (saurik) */ /* GNU General Public License, Version 3 {{{ */ @@ -24,6 +24,8 @@ #include #include +#include "iPhonePrivate.h" + extern bool IsWildcat_; @implementation UIViewController (Cydia) @@ -106,8 +108,22 @@ extern bool IsWildcat_; return nil; } +- (NSUInteger) supportedInterfaceOrientations { + return IsWildcat_ ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait; +} + - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { - return IsWildcat_ || orientation == UIInterfaceOrientationPortrait; + return ([self supportedInterfaceOrientations] & 1 << orientation) != 0; +} + +- (BOOL) shouldAutorotate { + return YES; +} + +- (void) setPageColor:(UIColor *)color { + if (color == nil) + color = [UIColor groupTableViewBackgroundColor]; + color_ = color; } @end