Brak opisu

QBImagePickerController.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // QBImagePickerController.h
  3. // QBImagePicker
  4. //
  5. // Created by Katsuma Tanaka on 2015/04/03.
  6. // Copyright (c) 2015 Katsuma Tanaka. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <Photos/Photos.h>
  10. @class QBImagePickerController;
  11. @protocol QBImagePickerControllerDelegate <NSObject>
  12. @optional
  13. - (void)qb_imagePickerController:(QBImagePickerController *)imagePickerController didFinishPickingAssets:(NSArray *)assets;
  14. - (void)qb_imagePickerControllerDidCancel:(QBImagePickerController *)imagePickerController;
  15. - (BOOL)qb_imagePickerController:(QBImagePickerController *)imagePickerController shouldSelectAsset:(PHAsset *)asset;
  16. - (void)qb_imagePickerController:(QBImagePickerController *)imagePickerController didSelectAsset:(PHAsset *)asset;
  17. - (void)qb_imagePickerController:(QBImagePickerController *)imagePickerController didDeselectAsset:(PHAsset *)asset;
  18. @end
  19. typedef NS_ENUM(NSUInteger, QBImagePickerMediaType) {
  20. QBImagePickerMediaTypeAny = 0,
  21. QBImagePickerMediaTypeImage,
  22. QBImagePickerMediaTypeVideo
  23. };
  24. @interface QBImagePickerController : UIViewController
  25. @property (nonatomic, weak) id<QBImagePickerControllerDelegate> delegate;
  26. @property (nonatomic, strong, readonly) NSMutableOrderedSet *selectedAssets;
  27. @property (nonatomic, copy) NSArray *assetCollectionSubtypes;
  28. @property (nonatomic, assign) QBImagePickerMediaType mediaType;
  29. @property (nonatomic, assign) BOOL allowsMultipleSelection;
  30. @property (nonatomic, assign) NSUInteger minimumNumberOfSelection;
  31. @property (nonatomic, assign) NSUInteger maximumNumberOfSelection;
  32. @property (nonatomic, copy) NSString *prompt;
  33. @property (nonatomic, assign) BOOL showsNumberOfSelectedAssets;
  34. @property (nonatomic, assign) NSUInteger numberOfColumnsInPortrait;
  35. @property (nonatomic, assign) NSUInteger numberOfColumnsInLandscape;
  36. @end