Created
August 8, 2011 23:43
-
-
Save lottadot/1133056 to your computer and use it in GitHub Desktop.
iOS CLLocation Category to force a custom lat/lon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CLLocation+Simulator.h | |
// had | |
// | |
// Created by Shane Zatezalo on 7/13/11. | |
// Copyright 2011 Lottadot, LLC. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <CoreLocation/CoreLocation.h> | |
@interface CLLocationManager (Simulator) | |
@end | |
/////////////////////////////////////////////////////// | |
// | |
// CLLocation+Simulator.m | |
// had | |
// | |
// Created by Shane Zatezalo on 7/13/11. | |
// Copyright 2011 Lottadot, LLC. All rights reserved. | |
// | |
#import "CLLocation+Simulator.h" | |
#import <CoreLocation/CoreLocation.h> | |
@implementation CLLocationManager (Simulator) | |
#ifdef TARGET_IPHONE_SIMULATOR | |
-(void)startUpdatingLocation { | |
CLLocation *hilliard = [[[CLLocation alloc] | |
initWithLatitude:40.010787 | |
longitude:-83.155518] autorelease]; | |
[self.delegate locationManager:self | |
didUpdateToLocation:hilliard | |
fromLocation:hilliard]; | |
} | |
#endif // TARGET_IPHONE_SIMULATOR | |
@end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment