Commit cfa31a85 authored by yuzheng.tz's avatar yuzheng.tz

1. 修复Bug:选择照片结束后,dealloc方法会在15秒后才调用;

2. 删除imagePickerControllerDidCancel的代理方法;
parent f3a731aa
......@@ -29,7 +29,7 @@ static CGFloat TZScreenScale;
dispatch_once(&onceToken, ^{
manager = [[self alloc] init];
if (iOS8Later) {
manager.cachingImageManager = [[PHCachingImageManager alloc] init];
// manager.cachingImageManager = [[PHCachingImageManager alloc] init];
// manager.cachingImageManager.allowsCachingHighQualityImages = YES;
}
......
......@@ -4,7 +4,7 @@
//
// Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved.
// version 1.7.8 - 2016.12.20
// version 1.7.9 - 2017.04.01
/*
经过测试,比起xib的方式,把TZAssetCell改用纯代码的方式来写,滑动帧数明显提高了(约提高10帧左右)
......@@ -186,7 +186,7 @@
// photos数组里的UIImage对象,默认是828像素宽,你可以通过设置photoWidth属性的值来改变它
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto;
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos;
- (void)imagePickerControllerDidCancel:(TZImagePickerController *)picker __attribute__((deprecated("Use -tz_imagePickerControllerDidCancel:.")));
//- (void)imagePickerControllerDidCancel:(TZImagePickerController *)picker __attribute__((deprecated("Use -tz_imagePickerControllerDidCancel:.")));
- (void)tz_imagePickerControllerDidCancel:(TZImagePickerController *)picker;
// If user picking a video, this callback will be called.
......
......@@ -4,7 +4,7 @@
//
// Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved.
// version 1.7.8 - 2016.12.20
// version 1.7.9 - 2017.04.01
#import "TZImagePickerController.h"
#import "TZPhotoPickerController.h"
......@@ -316,8 +316,9 @@
[[UIApplication sharedApplication].keyWindow addSubview:_progressHUD];
// if over time, dismiss HUD automatic
__weak typeof(self) weakSelf = self;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.timeout * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self hideProgressHUD];
[weakSelf hideProgressHUD];
});
}
......@@ -466,6 +467,10 @@
return UIInterfaceOrientationMaskPortrait;
}
- (void)dealloc {
NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}
#pragma mark - Public
- (void)cancelButtonClick {
......@@ -479,10 +484,12 @@
}
- (void)callDelegateMethod {
/*
// 兼容旧版本
if ([self.pickerDelegate respondsToSelector:@selector(imagePickerControllerDidCancel:)]) {
[self.pickerDelegate imagePickerControllerDidCancel:self];
}
*/
if ([self.pickerDelegate respondsToSelector:@selector(tz_imagePickerControllerDidCancel:)]) {
[self.pickerDelegate tz_imagePickerControllerDidCancel:self];
}
......@@ -566,6 +573,10 @@
}];
}
- (void)dealloc {
NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}
#pragma mark - UITableViewDataSource && Delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
......@@ -663,7 +663,7 @@ static CGSize AssetGridThumbnailSize;
}
- (void)dealloc {
//NSLog(@"TZPhotoPickerController dealloc");
NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}
#pragma mark - Asset Caching
......
......@@ -384,7 +384,7 @@
#pragma mark - Private Method
- (void)dealloc {
//NSLog(@"TZPhotoPreviewController dealloc");
NSLog(@"%@ dealloc",NSStringFromClass(self.class));
}
- (void)refreshNaviBarAndBottomBarState {
......
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