Skip to content

Commit

Permalink
1.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujianping committed Jun 27, 2022
1 parent fde3dec commit 58bb74e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion JPImageresizerView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'JPImageresizerView'
s.version = '1.9.8'
s.version = '1.9.9'
s.summary = '一个专门裁剪图片、GIF、视频的轮子😋简单易用、功能丰富☕️'

# This description is used to generate tags and improve search results.
Expand Down
3 changes: 2 additions & 1 deletion JPImageresizerView/Classes/JPImageresizerFrameView.m
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,9 @@ - (void)__hideOrShowGridLines:(BOOL)isHide animateDuration:(NSTimeInterval)durat

- (void)__hideOrShowSlider:(BOOL)isHide animateDuration:(NSTimeInterval)duration {
if (!self.slider) return;
CGFloat alpha = isHide ? 0 : (_isPreview ? 0 : 1);
[UIView animateWithDuration:duration animations:^{
self.slider.alpha = isHide ? 0 : 1;
self.slider.alpha = alpha;
}];
}

Expand Down
14 changes: 7 additions & 7 deletions JPImageresizerView/Classes/JPImageresizerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
[self __removeVideoObj];
}
if (_slider) {
_slider.alpha = 1;
_slider.alpha = self.isPreview ? 0 : 1;
[self addSubview:_slider];
if (_frameView) {
CGRect sliderFrame = [_frameView convertRect:_frameView.imageresizerFrame toView:self];
Expand Down Expand Up @@ -338,7 +338,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:duration1 delay:0 options:options animations:^{
self.playerView.alpha = 1;
self.slider.alpha = 1;
self.slider.alpha = self.isPreview ? 0 : 1;
} completion:^(BOOL finished) {
[self __removeImage];
self.frameView.playerView = self.playerView;
Expand All @@ -354,7 +354,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
[self __updateImageViewImage:NO];
[UIView animateWithDuration:duration1 delay:0 options:options animations:^{
self.playerView.alpha = 0;
self.slider.alpha = isShowSlider ? 1 : 0;
self.slider.alpha = isShowSlider ? (self.isPreview ? 0 : 1) : 0;
} completion:^(BOOL finished) {
[self __removeVideoObj];
[UIView animateWithDuration:duration2 delay:0 options:options animations:^{
Expand All @@ -370,7 +370,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
if (!isVideo) {
[UIView transitionWithView:self.imageView duration:duration1 options:(options | UIViewAnimationOptionTransitionCrossDissolve) animations:^{
[self __updateImageViewImage:NO];
self.slider.alpha = isShowSlider ? 1 : 0;
self.slider.alpha = isShowSlider ? (self.isPreview ? 0 : 1) : 0;
} completion:^(BOOL finished) {
[UIView animateWithDuration:duration2 delay:0 options:self->_animationOption animations:^{
[self __updateSubviewLayouts:duration2];
Expand All @@ -387,7 +387,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:duration1 delay:0 options:options animations:^{
playerView.alpha = 1;
self.slider.alpha = 1;
self.slider.alpha = self.isPreview ? 0 : 1;
} completion:^(BOOL finished) {
[self.playerView removeFromSuperview];
self.playerView = playerView;
Expand Down Expand Up @@ -417,7 +417,7 @@ - (void)__updateImageView:(BOOL)isVideo animated:(BOOL)isAnimated {
}
if (_slider) {
self.frameView.slider = self.slider;
self.slider.alpha = 1;
self.slider.alpha = self.isPreview ? 0 : 1;
[self addSubview:self.slider];
}
[self __updateSubviewLayouts:0];
Expand Down Expand Up @@ -671,7 +671,7 @@ - (void)setIsLoopPlaybackGIF:(BOOL)isLoopPlaybackGIF {
self.slider.alpha = 0;
[self addSubview:self.slider];
[UIView animateWithDuration:0.2 animations:^{
self.slider.alpha = 1;
self.slider.alpha = self.isPreview ? 0 : 1;
}];
self.frameView.slider = self.slider;
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[英文文档(English document)](https://github.com/Rogue24/JPImageresizerView/blob/master/README_EN.md) | [掘金](https://juejin.cn/post/6958761756978053150) |
[高仿小红书App可拖拽任意角度的裁剪功能](https://github.com/Rogue24/JPCrop)

## 简介(当前版本:1.9.8
## 简介(当前版本:1.9.9

一个专门裁剪图片、GIF、视频的轮子,简单易用,功能丰富(高自由度的参数设定、支持旋转和镜像翻转、蒙版、压缩等),能满足绝大部分裁剪的需求。

Expand Down Expand Up @@ -676,7 +676,7 @@ self.imageresizerView.isAutoScale = NO;

版本 | 更新内容
----|------
1.9.0~1.9.7 | 1. 图片新增N宫格裁剪;<br>2. 所有的裁剪完成回调统一返回JPImageresizerResult实例;<br>3. 兼容Swift环境;<br>4. 修复`isShowGridlinesWhenDragging`属性为YES时,拖动图片本身没有显示网格的问题;<br>5. 修复部分音频有问题的视频裁剪出错的问题;<br>6. 修复裁剪视频或GIF时进度条没有显示的问题;<br>7. 新增更多`Configure`初始化和可自定义旋转至目标方向的API。
1.9.0~1.9.9 | 1. 图片新增N宫格裁剪;<br>2. 所有的裁剪完成回调统一返回JPImageresizerResult实例;<br>3. 兼容Swift环境;<br>4. 修复`isShowGridlinesWhenDragging`属性为YES时,拖动图片本身没有显示网格的问题;<br>5. 修复部分音频有问题的视频裁剪出错的问题;<br>6. 修复裁剪视频或GIF时进度条没有显示的问题;<br>7. 新增更多`Configure`初始化和可自定义旋转至目标方向的API;<br>8. 修复在预览模式下会显示进度条的问题
1.7.8~1.8.3 | 1. 新增可保存当前历史状态的功能;<br>2. 修复GIF裁剪某一帧画面时的后缀名误设问题;<br>3. 修复仅放大而无法裁剪的问题;<br>4. 修复从系统相册选择的视频没有画面的问题;<br>5. 修复预览模式下进度条没有隐藏的问题。
1.7.6~1.7.7 | 1. 修复了固定比例旋转时无故放大的问题;<br>2. 修复iOS14版本下自定义进度条的拖动块消失的问题。
1.7.3~1.7.5 | 1. 修复了初始化无法固定裁剪比例的问题;<br>2. 现在圆切和蒙版均可设置是否自由拖拽;<br>3. 优化了设置裁剪宽高比和重置的接口;<br>4. 优化了图片缓存逻辑;<br>5. 修复了GIF时长过短导致截取错误的问题。
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

*本人英语小白,这里基本都是用百度翻译出来的,Sorry。*

## Brief introduction (Current version: 1.9.8)
## Brief introduction (Current version: 1.9.9)

A special wheel for cutting pictures, GIF and videos is simple and easy to use, with rich functions (high degree of freedom parameter setting, supporting rotation and mirror flipping, masking, compression, etc.), which can meet the needs of most cutting.

Expand Down

0 comments on commit 58bb74e

Please sign in to comment.