Skip to content

Commit

Permalink
1.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujianping committed Jan 26, 2022
1 parent e35bab9 commit 2b1b6c3
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 94 deletions.
22 changes: 7 additions & 15 deletions Example/JPImageresizerView/JPConfigureModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,60 +17,52 @@ @implementation JPConfigureModel
JPConfigureModel *model1 = [self new];
model1.title = @"默认样式";
model1.statusBarStyle = UIStatusBarStyleLightContent;
model1.configure = [JPImageresizerConfigure defaultConfigureWithImage:nil make:nil];
model1.configure = [JPImageresizerConfigure defaultConfigure];

JPConfigureModel *model2 = [self new];
model2.title = @"深色毛玻璃遮罩";
model2.statusBarStyle = UIStatusBarStyleLightContent;
model2.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigureWithImage:nil make:nil];
model2.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigure];

JPConfigureModel *model3 = [self new];
model3.title = @"浅色毛玻璃遮罩";
model3.statusBarStyle = UIStatusBarStyleDefault;
model3.configure = [JPImageresizerConfigure lightBlurMaskTypeConfigureWithImage:nil make:nil];
model3.configure = [JPImageresizerConfigure lightBlurMaskTypeConfigure];

JPConfigureModel *model4 = [self new];
model4.title = @"拉伸样式的边框图片";
model4.statusBarStyle = UIStatusBarStyleDefault;
model4.configure = [JPImageresizerConfigure lightBlurMaskTypeConfigureWithImage:nil make:^(JPImageresizerConfigure *configure) {
configure
model4.configure = [JPImageresizerConfigure lightBlurMaskTypeConfigure]
.jp_strokeColor([UIColor colorWithRed:(205.0 / 255.0) green:(107.0 / 255.0) blue:(153.0 / 255.0) alpha:1.0])
.jp_borderImage(self.class.stretchBorderImage)
.jp_borderImageRectInset(self.class.stretchBorderImageRectInset);
}];

JPConfigureModel *model5 = [self new];
model5.title = @"平铺样式的边框图片";
model5.statusBarStyle = UIStatusBarStyleLightContent;
model5.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigureWithImage:nil make:^(JPImageresizerConfigure *configure) {
configure
model5.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigure]
.jp_frameType(JPClassicFrameType)
.jp_borderImage(self.class.tileBorderImage)
.jp_borderImageRectInset(self.class.tileBorderImageRectInset);
}];

JPConfigureModel *model6 = [self new];
model6.title = @"圆切样式";
model6.statusBarStyle = UIStatusBarStyleDefault;
model6.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigureWithImage:nil make:^(JPImageresizerConfigure *configure) {
configure
model6.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigure]
.jp_strokeColor(JPRGBColor(250, 250, 250))
.jp_frameType(JPClassicFrameType)
.jp_isClockwiseRotation(YES)
.jp_animationCurve(JPAnimationCurveEaseOut)
.jp_isRoundResize(YES)
.jp_isArbitrarily(NO);
}];

JPConfigureModel *model7 = [self new];
model7.title = @"蒙版样式";
model7.statusBarStyle = UIStatusBarStyleLightContent;
model7.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigureWithImage:nil make:^(JPImageresizerConfigure *configure) {
configure
model7.configure = [JPImageresizerConfigure darkBlurMaskTypeConfigure]
.jp_frameType(JPClassicFrameType)
.jp_maskImage([UIImage imageNamed:@"love.png"])
.jp_isArbitrarily(NO);
}];

examplesModels_ = @[model1, model2, model3, model4, model5, model6, model7];
return examplesModels_;
Expand Down
7 changes: 6 additions & 1 deletion Example/JPImageresizerView/JPTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ @interface JPTableViewController () <UIImagePickerControllerDelegate, UINavigati

@implementation JPTableViewController

#pragma mark - Static variable

static JPImageresizerConfigure *savedConfigure_ = nil;
+ (void)setSavedConfigure:(JPImageresizerConfigure *)savedConfigure {
savedConfigure_ = savedConfigure;
Expand All @@ -31,6 +33,10 @@ + (JPImageresizerConfigure *)savedConfigure {
return savedConfigure_;
}

static JPImageresizerConfigure *gifConfigure_;

#pragma mark - ViewController's life cycle

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Example";
Expand Down Expand Up @@ -143,7 +149,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

#pragma mark - Table view delegate

static JPImageresizerConfigure *gifConfigure_;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.section) {
Expand Down
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.6'
s.version = '1.9.7'
s.summary = '一个专门裁剪图片、GIF、视频的轮子😋简单易用、功能丰富☕️'

# This description is used to generate tags and improve search results.
Expand Down
33 changes: 24 additions & 9 deletions JPImageresizerView/Classes/JPImageresizerConfigure.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ NS_ASSUME_NONNULL_BEGIN
- isCleanHistoryAfterInitial = YES;
*/

/**
* 默认配置(空资源)
*/
+ (instancetype)defaultConfigure;

/* 默认参数的基础上:
- blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
- bgColor = UIColor.whiteColor;
- maskAlpha = 0.3;
- strokeColor = R: 56, G: 121, B: 242 */
/**
* 浅色毛玻璃默认配置(空资源)
*/
+ (JPImageresizerConfigure *)lightBlurMaskTypeConfigure;

/* 默认参数的基础上:
- blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
- bgColor = UIColor.blackColor;
- maskAlpha = 0.3; */
/**
* 深色毛玻璃默认配置(空资源)
*/
+ (JPImageresizerConfigure *)darkBlurMaskTypeConfigure;

/**
* 默认配置裁剪图片/GIF(UIImage)
*/
Expand Down Expand Up @@ -65,11 +89,6 @@ NS_ASSUME_NONNULL_BEGIN
fixProgressBlock:(JPExportVideoProgressBlock)fixProgressBlock
fixCompleteBlock:(JPExportVideoCompleteBlock)fixCompleteBlock;

/* 默认参数的基础上:
- blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
- bgColor = UIColor.whiteColor;
- maskAlpha = 0.3;
- strokeColor = R: 56, G: 121, B: 242 */
/**
* 浅色毛玻璃配置裁剪图片/GIF(UIImage)
*/
Expand Down Expand Up @@ -97,10 +116,6 @@ NS_ASSUME_NONNULL_BEGIN
fixProgressBlock:(JPExportVideoProgressBlock)fixProgressBlock
fixCompleteBlock:(JPExportVideoCompleteBlock)fixCompleteBlock;

/* 默认参数的基础上:
- blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
- bgColor = UIColor.blackColor;
- maskAlpha = 0.3; */
/**
* 深色毛玻璃配置裁剪图片/GIF(UIImage)
*/
Expand Down
Loading

0 comments on commit 2b1b6c3

Please sign in to comment.