Commit 4b6d479c authored by yuzheng.tz's avatar yuzheng.tz

修复定位方法的内存泄漏问题

parent e98bb3a0
......@@ -525,10 +525,11 @@ static CGSize AssetGridThumbnailSize;
// 调用相机
- (void)pushImagePickerController {
// 提前定位
__weak typeof(self) weakSelf = self;
[[TZLocationManager manager] startLocationWithSuccessBlock:^(CLLocation *location, CLLocation *oldLocation) {
_location = location;
weakSelf.location = location;
} failureBlock:^(NSError *error) {
_location = nil;
weakSelf.location = nil;
}];
UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;
......
......@@ -302,10 +302,11 @@
// 调用相机
- (void)pushImagePickerController {
// 提前定位
__weak typeof(self) weakSelf = self;
[[TZLocationManager manager] startLocationWithSuccessBlock:^(CLLocation *location, CLLocation *oldLocation) {
_location = location;
weakSelf.location = location;
} failureBlock:^(NSError *error) {
_location = nil;
weakSelf.location = nil;
}];
UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;
......
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