InPutTextCell.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // InPutTextCell.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/11/2.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "InPutTextCell.h"
  9. @implementation InPutTextCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. self.inputtextFeild.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入" attributes:@{NSForegroundColorAttributeName:[UIColor lightGrayColor],NSFontAttributeName
  13. :[UIFont systemFontOfSize:17]
  14. }];
  15. [self.inputtextFeild addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
  16. }
  17. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  18. [super setSelected:selected animated:animated];
  19. }
  20. - (void)textFieldDidChange:(UITextField *)textField {
  21. self.formFieldsModel.paramString = textField.text;
  22. }
  23. - (void)setFormFieldsModel:(FormFieldsModel *)formFieldsModel {
  24. _formFieldsModel = formFieldsModel;
  25. self.inputtextFeild.text = _formFieldsModel.paramString;
  26. }
  27. @end