FWImagePickerPreviewController


@interface FWImagePickerPreviewController
    : FWImagePreviewController <UICollectionViewDataSource,
                                UICollectionViewDelegate,
                                FWImagePreviewViewDelegate>

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, weak) id<FWImagePickerPreviewControllerDelegate> delegate
  • 自定义裁剪控制器句柄,优先级低于delegate

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) FWImageCropController *_Nonnull (^)(UIImage *_Nonnull __strong) cropControllerBlock;
  • 自定义cell展示句柄,cellForItem自动调用,优先级低于delegate

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^) (FWImagePickerPreviewCollectionCell *_Nonnull __strong, NSIndexPath *_Nonnull __strong) customCellBlock;
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong) UIColor *toolBarBackgroundColor
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong) UIColor *toolBarTintColor
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIView *topToolBarView
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, assign) CGFloat toolBarPaddingHorizontal
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIButton *backButton
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIButton *checkboxButton
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong) UIImage *checkboxImage
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong) UIImage *checkboxCheckedImage
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIView *bottomToolBarView
  • 自定义底部工具栏高度,默认同系统

    Declaration

    Objective-C

    @property (nonatomic) CGFloat bottomToolBarHeight;
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIButton *sendButton
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIButton *editButton
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UIButton *originImageCheckboxButton
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong) UIImage *originImageCheckboxImage
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong) UIImage *originImageCheckboxCheckedImage
  • 是否使用原图,不显示原图按钮时默认YES,显示原图按钮时默认NO

    Declaration

    Objective-C

    @property (nonatomic) BOOL shouldUseOriginImage;
  • 是否显示原图按钮,默认NO,设置后会修改shouldUseOriginImage

    Declaration

    Objective-C

    @property (nonatomic) BOOL showsOriginImageCheckboxButton;
  • 是否显示编辑按钮,默认YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL showsEditButton;
  • 是否显示编辑collectionView,默认YES,仅多选生效

    Declaration

    Objective-C

    @property (nonatomic) BOOL showsEditCollectionView;
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UICollectionViewFlowLayout *editCollectionViewLayout
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, strong, readonly) UICollectionView *editCollectionView
  • 编辑collectionView总高度,默认80

    Declaration

    Objective-C

    @property (nonatomic) CGFloat editCollectionViewHeight;
  • 编辑collectionCell大小,默认(60, 60)

    Declaration

    Objective-C

    @property (nonatomic) CGSize editCollectionCellSize;
  • 是否显示默认loading,优先级低于delegate,默认YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL showsDefaultLoading;
  • 由于组件需要通过本地图片的 FWAsset 对象读取图片的详细信息,因此这里的需要传入的是包含一个或多个 FWAsset 对象的数组

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSMutableArray<FWAsset *> *imagesAssetArray;
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong) NSMutableArray<FWAsset *> *selectedImageAssetArray
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, assign) FWAssetDownloadStatus downloadStatus
  • 最多可以选择的图片数,默认为9

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger maximumSelectImageCount;
  • 最少需要选择的图片数,默认为 0

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger minimumSelectImageCount;
  • 更新数据并刷新 UI,手工调用

    Declaration

    Objective-C

    - (void)updateImagePickerPreviewViewWithImagesAssetArray:
                (NSMutableArray<FWAsset *> *_Nullable)imageAssetArray
                                     selectedImageAssetArray:
                                         (NSMutableArray<FWAsset *> *_Nullable)
                                             selectedImageAssetArray
                                           currentImageIndex:
                                               (NSInteger)currentImageIndex
                                             singleCheckMode:(BOOL)singleCheckMode
                                                 previewMode:(BOOL)previewMode;

    Parameters

    imageAssetArray

    包含所有需要展示的图片的数组

    selectedImageAssetArray

    包含所有需要展示的图片中已经被选中的图片的数组

    currentImageIndex

    当前展示的图片在 imageAssetArray 的索引

    singleCheckMode

    是否为单选模式,如果是单选模式,则不显示 checkbox

    previewMode

    是否是预览模式,如果是预览模式,图片取消选中时editCollectionView会置灰而不是隐藏