FWImagePickerPlugin
@protocol FWImagePickerPlugin <NSObject>
图片选取插件协议,应用可自定义图片选取插件实现
-
从Camera选取单张图片插件方法
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController showImageCamera:(FWImagePickerFilterType)filterType allowsEditing:(BOOL)allowsEditing customBlock:(nullable void (^)(id _Nonnull __strong))customBlock completion:(nonnull void (^)(id _Nullable __strong, id _Nullable __strong, BOOL))completion;Parameters
viewController当前视图控制器
filterType过滤类型,默认0同系统
allowsEditing是否允许编辑
customBlock自定义配置句柄,默认nil
completion完成回调,主线程。参数1为对象(UIImage|PHLivePhoto|NSURL),2为结果信息,3为是否取消
-
从图片库选取多张图片插件方法
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController showImagePicker:(FWImagePickerFilterType)filterType selectionLimit:(NSInteger)selectionLimit allowsEditing:(BOOL)allowsEditing customBlock:(nullable void (^)(id _Nonnull __strong))customBlock completion:(nonnull void (^)(NSArray *_Nonnull __strong, NSArray *_Nonnull __strong, BOOL))completion;Parameters
viewController当前视图控制器
filterType过滤类型,默认0同系统
selectionLimit最大选择数量
allowsEditing是否允许编辑
customBlock自定义配置句柄,默认nil
completion完成回调,主线程。参数1为对象数组(UIImage|PHLivePhoto|NSURL),2位结果数组,3为是否取消
FWImagePickerPlugin Protocol Reference