From c1eeab57204ff13c934ce47534641e18eb08d21b Mon Sep 17 00:00:00 2001 From: longitachi Date: Wed, 7 Nov 2018 12:10:08 +0800 Subject: [PATCH] fix #318 --- .../ZLImageEditTools/ZLBrushBoardImageView.h | 19 ++++++++++++++++++ PhotoBrowser/ZLPhotoManager.m | 2 +- PhotoBrowser/ZLShowBigImgViewController.m | 20 ++++++++++++------- ZLPhotoBrowser.xcodeproj/project.pbxproj | 4 ++-- ZLPhotoBrowser/Info.plist | 4 ++-- 5 files changed, 37 insertions(+), 12 deletions(-) create mode 100755 PhotoBrowser/ZLImageEditTools/ZLBrushBoardImageView.h diff --git a/PhotoBrowser/ZLImageEditTools/ZLBrushBoardImageView.h b/PhotoBrowser/ZLImageEditTools/ZLBrushBoardImageView.h new file mode 100755 index 00000000..6fe012cd --- /dev/null +++ b/PhotoBrowser/ZLImageEditTools/ZLBrushBoardImageView.h @@ -0,0 +1,19 @@ +// +// ZLBrushBoardImageView.h +// ZLPhotoBrowser +// +// Created by long on 2018/5/9. +// Copyright © 2018年 long. All rights reserved. +// + +#import + +@interface ZLBrushBoardImageView : UIImageView + +@property (nonatomic, strong) UIColor *drawColor; + +@property (nonatomic, assign) BOOL drawEnable; + +- (void)revoke; + +@end diff --git a/PhotoBrowser/ZLPhotoManager.m b/PhotoBrowser/ZLPhotoManager.m index 4c80c300..489dd16d 100644 --- a/PhotoBrowser/ZLPhotoManager.m +++ b/PhotoBrowser/ZLPhotoManager.m @@ -951,7 +951,7 @@ + (AVMutableVideoComposition *)getVideoComposition:(AVAsset *)asset renderSize:( instruction.timeRange = CMTimeRangeMake(kCMTimeZero, composition.duration); //处理视频旋转 - AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:assetVideoTrack]; + AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack]; [layerInstruction setOpacity:0.0 atTime:assetVideoTrack.timeRange.duration]; //视频旋转,获取视频旋转角度,然后旋转对应角度,保持视频方向正确 CGFloat degree = [self getVideoDegree:videoTrack]; diff --git a/PhotoBrowser/ZLShowBigImgViewController.m b/PhotoBrowser/ZLShowBigImgViewController.m index afee6655..5767bb73 100644 --- a/PhotoBrowser/ZLShowBigImgViewController.m +++ b/PhotoBrowser/ZLShowBigImgViewController.m @@ -395,6 +395,18 @@ - (void)btnDone_Click:(UIButton *)btn } - (void)btnBack_Click +{ + [self callBack]; + + UIViewController *vc = [self.navigationController popViewControllerAnimated:YES]; + //由于collectionView的frame的width是大于该界面的width,所以设置这个颜色是为了pop时候隐藏collectionView的黑色背景 + _collectionView.backgroundColor = [UIColor clearColor]; + if (!vc) { + [self.navigationController dismissViewControllerAnimated:YES completion:nil]; + } +} + +- (void)callBack { ZLImageNavigationController *nav = (ZLImageNavigationController *)self.navigationController; if (self.btnBackBlock) { @@ -404,13 +416,6 @@ - (void)btnBack_Click if (self.cancelPreviewBlock) { self.cancelPreviewBlock(); } - - UIViewController *vc = [self.navigationController popViewControllerAnimated:YES]; - //由于collectionView的frame的width是大于该界面的width,所以设置这个颜色是为了pop时候隐藏collectionView的黑色背景 - _collectionView.backgroundColor = [UIColor clearColor]; - if (!vc) { - [self.navigationController dismissViewControllerAnimated:YES completion:nil]; - } } - (void)navRightBtn_Click:(UIButton *)btn @@ -488,6 +493,7 @@ - (void)panAction:(UIPanGestureRecognizer *)pan } else if (_panCount == 1) { _shouldStartDismiss = YES; self.interactive = YES; + [self callBack]; [self.navigationController popViewControllerAnimated:YES]; } diff --git a/ZLPhotoBrowser.xcodeproj/project.pbxproj b/ZLPhotoBrowser.xcodeproj/project.pbxproj index cbe2507e..d3e44122 100644 --- a/ZLPhotoBrowser.xcodeproj/project.pbxproj +++ b/ZLPhotoBrowser.xcodeproj/project.pbxproj @@ -611,7 +611,7 @@ INFOPLIST_FILE = ZLPhotoBrowser/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = ZL.TTest; + PRODUCT_BUNDLE_IDENTIFIER = ZL.TTTest; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = 1; }; @@ -627,7 +627,7 @@ INFOPLIST_FILE = ZLPhotoBrowser/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = ZL.TTest; + PRODUCT_BUNDLE_IDENTIFIER = ZL.TTTest; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = 1; }; diff --git a/ZLPhotoBrowser/Info.plist b/ZLPhotoBrowser/Info.plist index 8b590c22..515842c6 100644 --- a/ZLPhotoBrowser/Info.plist +++ b/ZLPhotoBrowser/Info.plist @@ -19,11 +19,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.6.7 + 2.7.5 CFBundleSignature ???? CFBundleVersion - 2 + 1 LSRequiresIPhoneOS NSAppTransportSecurity