You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/11/21 20:09:16 UTC
[2/3] ios commit: Removing forced status bar rotation logic
Removing forced status bar rotation logic
Fixes https://issues.apache.org/jira/browse/CB-1831
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/5ce5e153
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/5ce5e153
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/5ce5e153
Branch: refs/heads/master
Commit: 5ce5e15363c4409d63b00ff4f90136cc21c0358e
Parents: a37d37b
Author: Kevin Hawkins <kh...@salesforce.com>
Authored: Fri Nov 9 15:04:46 2012 -0800
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Nov 21 13:53:53 2012 -0500
----------------------------------------------------------------------
.../project/__TESTING__/Classes/AppDelegate.m | 31 ---------------
1 files changed, 0 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/5ce5e153/bin/templates/project/__TESTING__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.m b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
index 923b77b..d1263a3 100644
--- a/bin/templates/project/__TESTING__/Classes/AppDelegate.m
+++ b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
@@ -75,37 +75,6 @@
// NOTE: To customize the view's frame size (which defaults to full screen), override
// [self.viewController viewWillAppear:] in your view controller.
- // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
- BOOL forceStartupRotation = YES;
- UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation];
-
- if (UIDeviceOrientationUnknown == curDevOrientation) {
- // UIDevice isn't firing orientation notifications yet… go look at the status bar
- curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
- }
-
- if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
- if ([self.viewController supportsOrientation:curDevOrientation]) {
- forceStartupRotation = NO;
- }
- }
-
- if (forceStartupRotation) {
- UIInterfaceOrientation newOrient;
- if ([self.viewController supportsOrientation:UIInterfaceOrientationPortrait]) {
- newOrient = UIInterfaceOrientationPortrait;
- } else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeLeft]) {
- newOrient = UIInterfaceOrientationLandscapeLeft;
- } else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeRight]) {
- newOrient = UIInterfaceOrientationLandscapeRight;
- } else {
- newOrient = UIInterfaceOrientationPortraitUpsideDown;
- }
-
- NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
- [[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
- }
-
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];