RAPhotoItemModel.m 575 B

123456789101112131415161718192021222324252627
  1. //
  2. // RAPhotoItemModel.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/10/30.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RAPhotoItemModel.h"
  9. @implementation RAPhotoItemModel
  10. - (void)setPhoto:(UIImage *)photo {
  11. _photo = photo;
  12. if (_delegate && [_delegate respondsToSelector:@selector(refreshUI)]) {
  13. [_delegate refreshUI];
  14. }
  15. }
  16. - (void)setDelegate:(id<RAPhotoModelDelegate>)delegate {
  17. if (_delegate && [_delegate respondsToSelector:@selector(unbind)]) {
  18. [_delegate unbind];
  19. }
  20. _delegate = delegate;
  21. }
  22. @end