DNAlbum.h 992 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // DNAlbum.h
  3. // DNImagePicker
  4. //
  5. // Created by Ding Xiao on 16/7/6.
  6. // Copyright © 2016年 Dennis. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class PHAssetCollection;
  10. @class PHFetchResult;
  11. NS_ASSUME_NONNULL_BEGIN
  12. NS_AVAILABLE_IOS(8.0) @interface DNAlbum : NSObject
  13. + (DNAlbum *)albumWithAssetCollection:(PHAssetCollection *)collection
  14. results:(PHFetchResult *)results;
  15. /*
  16. @note use this model to store the album's 'result, 'count, 'name, 'startDate
  17. to avoid request and reserve too much times.
  18. */
  19. @property (nonatomic, strong, nullable) PHFetchResult *results;
  20. @property (nonatomic, copy, nullable) NSString *identifier;
  21. @property (nonatomic, copy, nullable) NSString *albumTitle;
  22. @property (nonatomic, assign) NSInteger count;
  23. @property (nonatomic, readonly, nullable) NSAttributedString *albumAttributedString;
  24. - (void)fetchPostImageWithSize:(CGSize)size imageResutHandler:(void (^)(UIImage *))handler;
  25. @end
  26. NS_ASSUME_NONNULL_END