Simple location picker with a built in maps. The selected item can be returned to the calling controller as a CLLocationCoordinate2D
.
- Link
CoreLocation.framework
andMapKit.framework
to your project. - Fill in
NSLocationWhenInUseUsageDescription
in your Info.plist if you use KGWLocationPicker on iOS 8 and above. - Include the
KGWLocationPickerViewController.h
header - Initialise the KGWLocationPicker
- Push the controller
KGWLocationPickerViewController *viewController =
[[KGWLocationPickerViewController alloc] initWithSucess:^(CLLocationCoordinate2D coordinate) {
NSLog(@"Lat, Lng = %f, %f", coordinate.latitude, coordinate.longitude);
}
onFailure:nil];
KGWLocationPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KGWLocationPicker"
KGWLocationPicker requires iOS 7.0 and above.
KGWLocationPicker is available under the MIT license. See the LICENSE file for more info.