Created
January 2, 2013 19:52
-
-
Save codeswimmer/4437365 to your computer and use it in GitHub Desktop.
iOS: How to Use Core Location Services To Acquire A Current Location
This file contains hidden or 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
| -(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