Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

iOS 获取当前地理位置信息(Block和Delegate两种方式) 定位,经纬度

License

Notifications You must be signed in to change notification settings

bindx/DXLocationManager

Repository files navigation

DXLocationManager

####使用CocoaPods

pod 'DXLocationManager',:git=>"https://github.com/bindx/DXLocationManager.git"

##使用方法

######iOS 6 & 7

如果你是在 iOS6 & 7中使用,在Info.plist文件中添加NSLocationUsageDescription Boolean YES

######iOS 8 & 9

在info.plist表里面添加两条

NSLocationAlwaysUsageDescription Boolean YES

NSLocationWhenInUseUsageDescription Boolean YES

用于提示用户授权使用地理定位功能时的提示语。

####导入头文件 #import "DXLocationManager.h"

###Block

[DXLocationManager getlocationWithBlock:^(double longitude, double latitude) {
 }];

###Delegate [GetLocationManger getMyLocationWithDelegate:YES];

GetLocationManger.delegate = self;

####实现代理 --LocationManagerDelegate

- (void)locationManager:(DXLocationManager *)manager didGetLocation(CLLocationCoordinate2D)coordinate success:(BOOL)success{
}

About

iOS 获取当前地理位置信息(Block和Delegate两种方式) 定位,经纬度

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /