Your Ad Here

Posted By

sendoa on 07/29/11


Tagged

corelocationsimulador


Versions (?)

Simulador de CoreLocation


 / Published in: Objective C
 

Meter el código en un archivo ".h". Posteriormente incluirlo en el header de la clase que nos interese de la siguiente forma:

import <CoreLocation/CoreLocation.h> import "CoreLocationSim.h"
  1. #ifdef TARGET_IPHONE_SIMULATOR
  2.  
  3. @interface CLLocationManager (Simulator)
  4. @end
  5.  
  6. @implementation CLLocationManager (Simulator)
  7.  
  8. -(void)startUpdatingLocation {
  9. CLLocation *powellsTech = [[[CLLocation alloc] initWithLatitude:45.523450 longitude:-122.678897] autorelease];
  10. [self.delegate locationManager:self
  11. didUpdateToLocation:powellsTech
  12. fromLocation:powellsTech];
  13. }
  14.  
  15. @end
  16.  
  17. #endif // TARGET_IPHONE_SIMULATOR

Report this snippet  

You need to login to post a comment.