cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/3] ios commit: Removing forced status bar rotation logic
Date Wed, 21 Nov 2012 19:09:16 GMT
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 <khawkins@salesforce.com>
Authored: Fri Nov 9 15:04:46 2012 -0800
Committer: Andrew Grieve <agrieve@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];
 


Mime
View raw message