DKPhotoPickerGroupTableViewCell.m 905 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // PickerGroupTableViewCell.m
  3. // DKAssetsPickerDemo
  4. //
  5. //
  6. #import "DKPhotoPickerGroupTableViewCell.h"
  7. #import "DKPhotoPickerGroup.h"
  8. #import <AssetsLibrary/AssetsLibrary.h>
  9. @interface DKPhotoPickerGroupTableViewCell ()
  10. @property (weak, nonatomic) IBOutlet UIImageView *groupImageView;
  11. @property (weak, nonatomic) IBOutlet UILabel *groupNameLabel;
  12. @property (weak, nonatomic) IBOutlet UILabel *groupPicCountLabel;
  13. @end
  14. @implementation DKPhotoPickerGroupTableViewCell
  15. - (void)setGroup:(DKPhotoPickerGroup *)group{
  16. _group = group;
  17. self.groupNameLabel.text = group.groupName;
  18. self.groupImageView.image = group.thumbImage;
  19. self.groupPicCountLabel.text = [NSString stringWithFormat:@"(%ld)",(long)group.assetsCount];
  20. }
  21. + (instancetype) instanceCell{
  22. return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] firstObject];
  23. }
  24. @end