RAEditMultPhotoModel.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // RAEditMultPhotoModel.m
  3. // Apex And Drivers
  4. //
  5. // Created by Jack on 2018/10/30.
  6. // Copyright © 2018年 USAI. All rights reserved.
  7. //
  8. #import "RAEditMultPhotoModel.h"
  9. #import "RAPhotoModel.h"
  10. @interface RAEditMultPhotoModel()
  11. @property (nonatomic,strong) RAPhotoModel *mapModle;
  12. @end
  13. @implementation RAEditMultPhotoModel
  14. - (RAPhotoModel *)mapModle {
  15. if (!_mapModle) {
  16. _mapModle = [RAPhotoModel new];
  17. }
  18. return _mapModle;
  19. }
  20. #pragma mark - Setter
  21. - (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
  22. [self.mapModle setValuesForKeysWithDictionary:keyedValues];
  23. }
  24. - (void)setWidth:(CGFloat)width {
  25. self.mapModle.width = width;
  26. }
  27. #pragma mark - Getter
  28. - (RAEditType)type {
  29. return (RAEditType)self.mapModle.type;
  30. }
  31. - (NSString *)title {
  32. return self.mapModle.title;
  33. }
  34. - (NSString *)key {
  35. return self.mapModle.key;
  36. }
  37. - (BOOL)required {
  38. return self.mapModle.required;
  39. }
  40. - (CGFloat)height {
  41. return self.mapModle.height;
  42. }
  43. - (RAPhotoModel *)model {
  44. return self.mapModle;
  45. }
  46. - (NSUInteger)photoCount {
  47. return self.mapModle.photoCount;
  48. }
  49. - (UIImage *)photoForIndex:(NSUInteger)index {
  50. return [self.mapModle photoAtIndex:index];
  51. }
  52. @end