ZMJImageEditor
功能介绍
定制、涂鸦和文字。各种旋转都做得很好,如果有 bug,欢迎 issue,以下是一些介绍功能的 GIF,支持国际化(裁剪、涂鸦、文字。各种旋转各种好,如果有 bug,欢迎 issue,下面是几个介绍功能的 GIF,支持国际化)
- draw 功能
- 文字
- 剪裁、旋转
- 支持贴图(纸张)新增
用法
调用
WBGImageEditor *editor = [[WBGImageEditor alloc] initWithImage:_imageView.image delegate:self];
[self presentViewController:editor animated:YES completion:nil];
回调 delegate
#pragma mark - WBGImageEditorDelegate
- (void)imageEditor:(WBGImageEditor *)editor didFinishEdittingWithImage:(UIImage *)image {
self.imageView.image = image;
[editor.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}
- (void)imageEditorDidCancel:(WBGImageEditor *)editor {
}
增加了图片资源回调
#pragma mark - WBGImageEditorDataSource
- (NSArray<WBGMoreKeyboardItem *> *)imageItemsEditor:(WBGImageEditor *)editor {
return @[
[WBGMoreKeyboardItem createByTitle:@"p1" imagePath:@"p1" image:[UIImage imageNamed:@"p1"]],
[WBGMoreKeyboardItem createByTitle:@"p2" imagePath:@"p2" image:[UIImage imageNamed:@"p2"]]
];
}
示例
要运行示例项目,请克隆仓库,然后从 Example 目录运行 pod install
命令。
以下是示例项目
需求
iOS7+
安装
ZMJImageEditor可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile
pod "ZMJImageEditor"
作者
keshiim, [email protected]
许可证
ZMJImageEditor遵循MIT许可证。更多信息见LICENSE文件。