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为是否取消