DKPhotoPickerViewController.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // PickerViewController.h
  3. // DKAssetsPickerDemo
  4. //
  5. // Copyright (c) 2014年 com.zixue101.www. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. // 回调
  9. typedef void(^callBackBlock)(id obj);
  10. // 状态组
  11. typedef NS_ENUM(NSInteger , PickerViewShowStatus) {
  12. PickerViewShowStatusGroup = 0, // default groups .
  13. PickerViewShowStatusCameraRoll ,
  14. PickerViewShowStatusSavePhotos ,
  15. PickerViewShowStatusPhotoStream ,
  16. PickerViewShowStatusVideo,
  17. };
  18. @protocol DKPhotoPickerViewControllerDelegate <NSObject>
  19. /**
  20. * 返回所有的Asstes对象
  21. */
  22. - (void) pickerViewControllerDoneAsstes : (NSArray *) assets;
  23. @end
  24. @interface DKPhotoPickerViewController : UIViewController
  25. // @optional
  26. @property (nonatomic , weak) id<DKPhotoPickerViewControllerDelegate> delegate;
  27. // 决定你是否需要push到内容控制器, 默认显示组
  28. @property (nonatomic , assign) PickerViewShowStatus status;
  29. // 可以用代理来返回值或者用block来返回值
  30. @property (nonatomic , copy) callBackBlock callBack;
  31. // 每次选择图片的最小数, 默认与最大数是9
  32. @property (nonatomic , assign) NSInteger minCount;
  33. @property (nonatomic , assign) NSInteger cameraCount;
  34. // 记录选中的值
  35. @property (strong,nonatomic) NSArray *selectPickers;
  36. // @function
  37. // 展示控制器
  38. - (void)show;
  39. @end