QMUIImagePickerPreviewViewController

@interface QMUIImagePickerPreviewViewController : QMUIImagePreviewViewController <QMUIImagePreviewViewDelegate>

@property(nullable, nonatomic, weak) id<QMUIImagePickerPreviewViewControllerDelegate> delegate;

@property(nullable, nonatomic, strong) UIColor *toolBarBackgroundColor UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIColor *toolBarTintColor UI_APPEARANCE_SELECTOR;

@property(nullable, nonatomic, strong, readonly) UIView *topToolBarView;
@property(nullable, nonatomic, strong, readonly) QMUINavigationButton *backButton;
@property(nullable, nonatomic, strong, readonly) QMUIButton *checkboxButton;

/// 由于组件需要通过本地图片的 QMUIAsset 对象读取图片的详细信息,因此这里的需要传入的是包含一个或多个 QMUIAsset 对象的数组
@property(nullable, nonatomic, strong) NSMutableArray<QMUIAsset *> *imagesAssetArray;
@property(nullable, nonatomic, strong) NSMutableArray<QMUIAsset *> *selectedImageAssetArray;

@property(nonatomic, assign) QMUIAssetDownloadStatus downloadStatus;

/// 最多可以选择的图片数,默认为无穷大
@property(nonatomic, assign) NSUInteger maximumSelectImageCount;
/// 最少需要选择的图片数,默认为 0
@property(nonatomic, assign) NSUInteger minimumSelectImageCount;
/// 选择图片超出最大图片限制时 alertView 的标题
@property(nullable, nonatomic, copy) NSString *alertTitleWhenExceedMaxSelectImageCount;
/// 选择图片超出最大图片限制时 alertView 的标题
@property(nullable, nonatomic, copy) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;

/**
 *  更新数据并刷新 UI,手工调用
 *
 *  @param imageAssetArray         包含所有需要展示的图片的数组
 *  @param selectedImageAssetArray 包含所有需要展示的图片中已经被选中的图片的数组
 *  @param currentImageIndex       当前展示的图片在 imageAssetArray 的索引
 *  @param singleCheckMode         是否为单选模式,如果是单选模式,则不显示 checkbox
 */
- (void)updateImagePickerPreviewViewWithImagesAssetArray:(NSMutableArray<QMUIAsset *> * _Nullable)imageAssetArray
                                 selectedImageAssetArray:(NSMutableArray<QMUIAsset *> * _Nullable)selectedImageAssetArray
                                       currentImageIndex:(NSInteger)currentImageIndex
                                         singleCheckMode:(BOOL)singleCheckMode;

@end

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, weak) id<QMUIImagePickerPreviewViewControllerDelegate> delegate

    Swift

    weak var delegate: QMUIImagePickerPreviewViewControllerDelegate? { get set }
  • Undocumented

    Declaration

    Objective-C

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

    Swift

    var toolBarBackgroundColor: UIColor? { get set }
  • Undocumented

    Declaration

    Objective-C

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

    Swift

    var toolBarTintColor: UIColor? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong, readonly) UIView *topToolBarView

    Swift

    var topToolBarView: UIView? { get }
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong, readonly) QMUINavigationButton *backButton

    Swift

    var backButton: QMUINavigationButton? { get }
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong, readonly) QMUIButton *checkboxButton

    Swift

    var checkboxButton: QMUIButton? { get }
  • 由于组件需要通过本地图片的 QMUIAsset 对象读取图片的详细信息,因此这里的需要传入的是包含一个或多个 QMUIAsset 对象的数组

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSMutableArray *imagesAssetArray;

    Swift

    var imagesAssetArray: NSMutableArray? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property(nullable, nonatomic, strong) NSMutableArray<QMUIAsset *> *selectedImageAssetArray

    Swift

    var selectedImageAssetArray: NSMutableArray? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property(nonatomic, assign) QMUIAssetDownloadStatus downloadStatus

    Swift

    var downloadStatus: Int32 { get set }
  • 最多可以选择的图片数,默认为无穷大

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger maximumSelectImageCount;

    Swift

    var maximumSelectImageCount: UInt { get set }
  • 最少需要选择的图片数,默认为 0

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger minimumSelectImageCount;

    Swift

    var minimumSelectImageCount: UInt { get set }
  • 选择图片超出最大图片限制时 alertView 的标题

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *alertTitleWhenExceedMaxSelectImageCount;

    Swift

    var alertTitleWhenExceedMaxSelectImageCount: String? { get set }
  • 选择图片超出最大图片限制时 alertView 的标题

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *alertButtonTitleWhenExceedMaxSelectImageCount;

    Swift

    var alertButtonTitleWhenExceedMaxSelectImageCount: String? { get set }
  • 更新数据并刷新 UI,手工调用

    Declaration

    Objective-C

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

    Swift

    func updateImagePickerPreviewView(withImagesAssetArray imageAssetArray: NSMutableArray?, selectedImageAssetArray: NSMutableArray?, currentImageIndex: Int, singleCheckMode: Bool)

    Parameters

    imageAssetArray

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

    selectedImageAssetArray

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

    currentImageIndex

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

    singleCheckMode

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

UIAppearance

  • Undocumented

    Declaration

    Objective-C

    + (instancetype)appearance;

    Swift

    class func appearance() -> Self