2010-01-21 4 views

Répondre

2

Si vous ne voulez pas de carte, vous n'avez pas besoin de MapKit. Utilisez simplement CLLocationManager.

- (id) init { 
    if (self = [super init]) { 
    locationManager = [[CLLocationManager alloc] init]; 
    [locationManager setDelegate:self]; 
    [locationManager startUpdatingLocation]; 
    } 
    return self; 
} 

- (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)location fromLocation:(CLLocation *)oldLocation { 
    NSLog(@"lat:%f lon:%f", location.coordinate.latitude, location.coordinate.longitude); 
} 
Questions connexes