aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/CordovaLib/Classes/CDVLocation.m
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-25 15:57:26 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-25 17:13:56 +0000
commit73e3d5d4077636487f07be1beff3b2714ee2b276 (patch)
tree4b4529f36ab68ec7c2a9e51bcfafbd57d9336cc8 /iPhone/CordovaLib/Classes/CDVLocation.m
parente5d7b3b62be5025f31c39b50ea3955398bc7cf40 (diff)
upgrade to phonegap 2.5 for ios
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVLocation.m')
-rwxr-xr-xiPhone/CordovaLib/Classes/CDVLocation.m14
1 files changed, 2 insertions, 12 deletions
diff --git a/iPhone/CordovaLib/Classes/CDVLocation.m b/iPhone/CordovaLib/Classes/CDVLocation.m
index 9814f35..07af30e 100755
--- a/iPhone/CordovaLib/Classes/CDVLocation.m
+++ b/iPhone/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: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;