TRELocationManager Class Reference

Inherits from NSObject
Declared in TRELocationManager.h

Overview

地理位置获取帮助类。

+ sharedInstance

获取单例。

+ (instancetype)sharedInstance

Return Value

单例。

Declared In

TRELocationManager.h

– currentLocationWithCallback:

获取当前地理位置。

- (void)currentLocationWithCallback:(void ( ^ ) ( BOOL isSuccessful , CLLocation *location ))callback

Parameters

callback

结果回调。

Discussion

Warning: 注意,对于 iOS 8 , TRELocationManager 内部使用 requestWhenInUseAuthorization 请求权限,请在 info.plist 中配置 NSLocationWhenInUseUsageDescription ,具体请参考这里

Declared In

TRELocationManager.h