YBIBPhotoAlbumManager.h 799 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // YBIBPhotoAlbumManager.h
  3. // YBImageBrowserDemo
  4. //
  5. // Created by 波儿菜 on 2018/8/28.
  6. // Copyright © 2018年 波儿菜. All rights reserved.
  7. //
  8. #import <Photos/Photos.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface YBIBPhotoAlbumManager : NSObject
  11. /**
  12. Get photo album authorization.
  13. */
  14. + (void)getPhotoAlbumAuthorizationSuccess:(void(^)(void))success failed:(void(^)(void))failed;
  15. /**
  16. Get 'AVAsset' by 'PHAsset' asynchronously, callback is in child thread.
  17. */
  18. + (void)getAVAssetWithPHAsset:(PHAsset *)phAsset completion:(void(^)(AVAsset * _Nullable asset))completion;
  19. /**
  20. Get 'ImageData' by 'PHAsset' synchronously, callback is in child thread.
  21. */
  22. + (void)getImageDataWithPHAsset:(PHAsset *)phAsset completion:(void(^)(NSData * _Nullable data))completion;
  23. @end
  24. NS_ASSUME_NONNULL_END