Skip to content

Commit 0803d53

Browse files
author
yuzheng
committed
add: stopUpdatingLocation API
1 parent d4f4f9b commit 0803d53

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

TZImagePickerController/TZImagePickerController/TZLocationManager.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
- (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
2121
- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
2222

23+
/// 结束定位
24+
- (void)stopUpdatingLocation;
25+
2326
@end
2427

TZImagePickerController/TZImagePickerController/TZLocationManager.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ - (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))success
5252
_failureBlock = failureBlock;
5353
}
5454

55+
- (void)stopUpdatingLocation {
56+
[self.locationManager stopUpdatingLocation];
57+
}
58+
5559
#pragma mark - CLLocationManagerDelegate
5660

5761
/// 地理位置发生改变时触发

0 commit comments

Comments
 (0)