summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-01-27 17:44:39 -0800
committerGrant Paul <chpwn@chpwn.com>2011-01-27 17:44:39 -0800
commit5e565049e26ac6541df632c31981bacde7bf980c (patch)
treea767fa31ca5c24666d5b838a8cd0b8e02b8ea2a3
parentb89fa270de1a17bf2505ed8bca773c52537a8061 (diff)
Sanity in rotation handling: centralize in CYViewController, as it should be.
-rw-r--r--MobileCydia.mm24
-rw-r--r--UICaboodle/RVPage.mm6
2 files changed, 2 insertions, 28 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 2079a6a..4421211 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4030,7 +4030,7 @@ static NSString *Warning_;
@end
/* }}} */
/* Emulated Loading Controller {{{ */
-@interface CYEmulatedLoadingController : UIViewController {
+@interface CYEmulatedLoadingController : CYViewController {
CYLoadingIndicator *indicator_;
UITabBar *tabbar_;
UINavigationBar *navbar_;
@@ -4062,10 +4062,6 @@ static NSString *Warning_;
} return self;
}
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- return (IsWildcat_ || orientation == UIInterfaceOrientationPortrait);
-}
-
@end
/* }}} */
@@ -6241,10 +6237,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
} return self;
}
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
-}
-
- (void) setUpdate:(NSDate *)date {
[self beginUpdate];
}
@@ -6480,17 +6472,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
@implementation CYNavigationController
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- // Inherit autorotation settings for modal parents.
- if ([self parentViewController] && [[self parentViewController] modalViewController] == self) {
- return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
- } else if ([self parentViewController]) {
- return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
- } else {
- return [super shouldAutorotateToInterfaceOrientation:orientation];
- }
-}
-
- (void) dealloc {
[super dealloc];
}
@@ -8183,9 +8164,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
} return self;
}
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
-}
@end
/* }}} */
diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm
index 4a8ea5d..a28e37c 100644
--- a/UICaboodle/RVPage.mm
+++ b/UICaboodle/RVPage.mm
@@ -12,10 +12,6 @@
- (void) reloadData {
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
- if ([self parentViewController]) {
- return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
- } else {
- return [super shouldAutorotateToInterfaceOrientation:orientation];
- }
+ return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad || orientation == UIInterfaceOrientationPortrait);
}
@end