cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/4] ios commit: [CB-2276] Remove CDVViewController from CDVLocation
Date Thu, 14 Feb 2013 16:07:00 GMT
[CB-2276] Remove CDVViewController from CDVLocation


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/70af80b3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/70af80b3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/70af80b3

Branch: refs/heads/master
Commit: 70af80b34a6cdc147c118f4d4524dd1d68776613
Parents: a606ee2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Wed Feb 13 16:28:11 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Feb 14 11:06:21 2013 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVLocation.m |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/70af80b3/CordovaLib/Classes/CDVLocation.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocation.m b/CordovaLib/Classes/CDVLocation.m
index 0b341f7..07af30e 100644
--- a/CordovaLib/Classes/CDVLocation.m
+++ b/CordovaLib/Classes/CDVLocation.m
@@ -18,7 +18,6 @@
  */
 
 #import "CDVLocation.h"
-#import "CDVViewController.h"
 #import "NSArray+Comparisons.h"
 
 #pragma mark Constants
@@ -477,17 +476,8 @@
 // helper method to check the orientation and start updating headings
 - (void)startHeadingWithFilter:(CLLocationDegrees)filter
 {
-    if ([self.locationManager respondsToSelector:@selector(headingOrientation)]) {
-        UIDeviceOrientation currentOrientation = [[UIDevice currentDevice] orientation];
-        if (currentOrientation != UIDeviceOrientationUnknown) {
-            CDVViewController* cdvViewController = (CDVViewController*)self.viewController;
-
-            if ([cdvViewController supportsOrientation:(UIInterfaceOrientation)currentOrientation])
{
-                self.locationManager.headingOrientation = (CLDeviceOrientation)currentOrientation;
-                // FYI UIDeviceOrientation and CLDeviceOrientation enums are currently the
same
-            }
-        }
-    }
+    // FYI UIDeviceOrientation and CLDeviceOrientation enums are currently the same
+    self.locationManager.headingOrientation = (CLDeviceOrientation)self.viewController.interfaceOrientation;
     self.locationManager.headingFilter = filter;
     [self.locationManager startUpdatingHeading];
     self.headingData.headingStatus = HEADINGSTARTING;


Mime
View raw message