Conversation
2.FLAnimatedImage替换为最新代码,只做了const BOOL isGIFData = imageSourceContainerType ? UTTypeConformsTo(imageSourceContainerType, kUTTypeGIF) : NO; 判断改动 3.增加TZWindowManager,Window管理类
…tionStatusForAccessLevel:PHAccessLevelReadWrite] iOS14.0判断
…ng for configuration named,解决
| resultImage = [self fixOrientation:resultImage]; | ||
| if (completion) completion(resultImage,info,NO); | ||
| }]; | ||
| if (@available(iOS 13.0, *)) { |
There was a problem hiding this comment.
这个建议抽一个公共方法(可以就放TZImageManager里),这个公共方法里判断iOS13,其它地方调用这个公共方法,可以省许多if代码。现在到处if else,回调处理逻辑重复存在,比较杂乱
There was a problem hiding this comment.
已经在TZImageManager 抽一个公共方法 requestImageDataFitSystemForAsset
| UIWindowScene *curWinSc = (UIWindowScene *)tmpSc; | ||
| return curWinSc.keyWindow; | ||
| } else { | ||
| return [[[UIApplication sharedApplication] windows] objectAtIndex:0]; |
There was a problem hiding this comment.
已经在 TZCommonTools 中currentKeyWindow重新获取keyWindow
| [UIApplication sharedApplication].statusBarHidden = NO; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
为了兼容iOS9以下系统,要留这么一大段if的话,就不支持iOS9以下了吧...
There was a problem hiding this comment.
要测试下,横竖屏切换是否会让状态栏显示哈,测试正常的话回复下哈
There was a problem hiding this comment.
切换横屏不显示 切换竖屏显示,在iOS13以后
iOS9以下代码删除
| isStatusBarHidden = [[TZWindowManager manager] currentWindow].windowScene.statusBarManager.statusBarHidden; | ||
| } else { | ||
| isStatusBarHidden = [UIApplication sharedApplication].statusBarHidden; | ||
| } |
There was a problem hiding this comment.
这个和对requestImageDataAndOrientationForAsset的调用一样,建议抽成个公共方法,到处去判断太冗余了
可以放到TZCommonTools里
There was a problem hiding this comment.
已经在 TZCommonTools 中currentStatusBarHidden 抽成个公共方法
| if (CGRectEqualToRect(keyWindow.bounds, [UIScreen mainScreen].bounds)) { | ||
| window = keyWindow; | ||
| } | ||
| } |
There was a problem hiding this comment.
这段取window的逻辑,和[[TZWindowManager manager] currentWindow]不一样,直接替换可能有问题吧?
There was a problem hiding this comment.
已经在 TZCommonTools 中currentKeyWindow重新获取keyWindow
| CGFloat naviBarHeight = statusBarHeight + _tzImagePickerVc.navigationBar.tz_height; | ||
| _naviBar.frame = CGRectMake(0, 0, self.view.tz_width, naviBarHeight); | ||
| _backButton.frame = CGRectMake(10, 10 + statusBarHeightInterval, 44, 44); | ||
| _selectButton.frame = CGRectMake(self.view.tz_width - 56, 10 + statusBarHeightInterval, 44, 44); |
There was a problem hiding this comment.
把10 + statusBarHeightInterval换成statusBarHeight的考虑是?
| #define CURRENT_SYSTEM_VERSION [[UIDevice currentDevice] systemVersion] | ||
| #define SYSTEM_VERSION_GREATER_THAN_15 ([CURRENT_SYSTEM_VERSION floatValue] >= 15.0) | ||
|
|
||
| @class TZAlbumCell, TZAssetCell; |
There was a problem hiding this comment.
Umbrella header for module 'TZImagePickerController' does not include header 'TZAssetCell.h'
| [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didChangeStatusBarOrientationNotification:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; | ||
| } | ||
|
|
||
| -(void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator { |
2.FLAnimatedImage替换为最新代码,只做了const BOOL isGIFData = imageSourceContainerType ? UTTypeConformsTo(imageSourceContainerType, kUTTypeGIF) : NO; 判断改动 3.增加TZWindowManager,Window管理类