Commit 0803d53d authored by yuzheng's avatar yuzheng

add: stopUpdatingLocation API

parent d4f4f9b8
...@@ -20,5 +20,8 @@ ...@@ -20,5 +20,8 @@
- (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock; - (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock; - (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
/// 结束定位
- (void)stopUpdatingLocation;
@end @end
...@@ -52,6 +52,10 @@ ...@@ -52,6 +52,10 @@
_failureBlock = failureBlock; _failureBlock = failureBlock;
} }
- (void)stopUpdatingLocation {
[self.locationManager stopUpdatingLocation];
}
#pragma mark - CLLocationManagerDelegate #pragma mark - CLLocationManagerDelegate
/// 地理位置发生改变时触发 /// 地理位置发生改变时触发
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment