Skip to content

Instantly share code, notes, and snippets.

@lottadot
Created August 8, 2011 23:43
Show Gist options
  • Save lottadot/1133056 to your computer and use it in GitHub Desktop.
Save lottadot/1133056 to your computer and use it in GitHub Desktop.
iOS CLLocation Category to force a custom lat/lon
//
// 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