要运行示例项目,克隆仓库,然后首先从Example目录运行pod install
#import "XBLocation.h"
[XBLocation registerLocation];
[self handleLocation:@selector(locationDidChange)];
// and
- (void)locationDidChange
{
NSLog(@"%f %f", [XBLocation currentLocation].coordinate.latitude, [XBLocation currentLocation].coordinate.longitude);
}
// or you can use current location everywhere
[XBLocation currentLocation];
XBLocation可通过CocoaPods获取。要安装它,只需在Podfile中添加以下行
pod "XBLocation"
Eugene Nguyen, [email protected]
XBLocation可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。