PSImageEditors
1.0.0
An open source image editing component. The style is based on the image editing effects of WeChat and DingTalk. It supports functions including graffiti, adding text, adding mosaics, cropping, etc. This component has been used in internal online projects.
下载Demo后,将子文件夹PSImageEditors拖入到项目中, 导入头文件PSImageEditors.h开始使用,注意: 项目中需要有Masonry.1.1.0!
pod 'PSImageEditors'
If you find that pod search PSImageEditors is not the latest version, you can execute pod repo update in the terminal to update the local warehouse, and search again after the update is completed.
UIImage *image = [UIImage imageNamed:@"[email protected]"];
PSImageEditor *imageEditor = [[PSImageEditor alloc] initWithImage:image delegate:self dataSource:self];
[self.navigationController pushViewController:imageEditor animated:YES];
#pragma mark - PSImageEditorDelegate
- (void)imageEditor:(PSImageEditor *)editor didFinishEdittingWithImage:(UIImage *)image {
self.imageView.image = image;
[editor dismiss];
NSLog(@"%s",__func__);
}
- (void)imageEditorDidCancel {
NSLog(@"%s",__func__);
}
#pragma mark - PSImageEditorDelegate
- (UIColor *)imageEditorDefaultColor {
return [UIColor redColor];
}
- (PSImageEditorMode)imageEditorDefalutEditorMode {
return PSImageEditorModeDraw;
}
- (CGFloat)imageEditorDrawPathWidth {
return 5;
}
- (UIFont *)imageEditorTextFont {
return [UIFont boldSystemFontOfSize:24];
}
- 2018.06.14 (tag:0.1.0):提交0.1.0版本
- 2020.07.16 (tag:0.2.0): 修复编辑图片模糊的问题,UI更新
- 2020.07.23 (tag:0.2.1): 增加默认选中编辑选项功能
- 2020.08.19 (tag:0.2.2): 底部ToolBar修改,文字组件优化体验