FormFieldsModel.m 972 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // FormFieldsModel.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/11/19.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "FormFieldsModel.h"
  9. @implementation FormFieldsModel
  10. - (CGFloat)getCellHeight {
  11. UILabel *textLabel = [UILabel new];
  12. textLabel.numberOfLines = 0;
  13. textLabel.font = [UIFont systemFontOfSize:15.f];
  14. textLabel.text = self.Value;
  15. if (!ISEmptyString(self.Value)){
  16. [ZYCTool setLabel:textLabel withSpace:10.f withFont:textLabel.font setLineSpace:0 setTextSpace:2.f];
  17. }
  18. CGSize textSize = [textLabel sizeThatFits:CGSizeMake(kGXScreenWidth-30, MAXFLOAT)];
  19. CGFloat height = 40+textSize.height+10;
  20. return height;
  21. }
  22. - (NSMutableArray<SelectImageModel *> *)paraImage{
  23. if (!_paraImage) {
  24. _paraImage = [NSMutableArray array];
  25. }
  26. return _paraImage;
  27. }
  28. - (NSString *)paramString {
  29. if (_paramString == nil) {
  30. return self.Value;
  31. }
  32. return _paramString;
  33. }
  34. @end