Skip to content

Commit

Permalink
fix #318
Browse files Browse the repository at this point in the history
  • Loading branch information
longitachi committed Nov 7, 2018
1 parent 48e9607 commit c1eeab5
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
19 changes: 19 additions & 0 deletions PhotoBrowser/ZLImageEditTools/ZLBrushBoardImageView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// ZLBrushBoardImageView.h
// ZLPhotoBrowser
//
// Created by long on 2018/5/9.
// Copyright © 2018年 long. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ZLBrushBoardImageView : UIImageView

@property (nonatomic, strong) UIColor *drawColor;

@property (nonatomic, assign) BOOL drawEnable;

- (void)revoke;

@end
2 changes: 1 addition & 1 deletion PhotoBrowser/ZLPhotoManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
20 changes: 13 additions & 7 deletions PhotoBrowser/ZLShowBigImgViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down Expand Up @@ -488,6 +493,7 @@ - (void)panAction:(UIPanGestureRecognizer *)pan
} else if (_panCount == 1) {
_shouldStartDismiss = YES;
self.interactive = YES;
[self callBack];
[self.navigationController popViewControllerAnimated:YES];
}

Expand Down
4 changes: 2 additions & 2 deletions ZLPhotoBrowser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions ZLPhotoBrowser/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.6.7</string>
<string>2.7.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down

0 comments on commit c1eeab5

Please sign in to comment.