Skip to content

Instantly share code, notes, and snippets.

@codeswimmer
Created January 2, 2013 19:52
Show Gist options
  • Select an option

  • Save codeswimmer/4437365 to your computer and use it in GitHub Desktop.

Select an option

Save codeswimmer/4437365 to your computer and use it in GitHub Desktop.
iOS: How to Use Core Location Services To Acquire A Current Location
-(void)acquireCurrentLocation
{
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
[locationManager startUpdatingLocation];
CLLocation *location = locationManager.location;
NSLog(@"Current Location: Latitude(%f), Longitude(%f)",location.coordinate.latitude, location.coordinate.longitude);
[locationManager release];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment