UrgentCell.m 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // UrgentCell.m
  3. // jitao
  4. //
  5. // Created by 罗云飞 on 2018/1/22.
  6. // Copyright © 2018年 罗云飞. All rights reserved.
  7. //
  8. #import "UrgentCell.h"
  9. @implementation UrgentCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. if (self) {
  13. _title = [UILabel new];
  14. _title.font = NewFont(fitScreenWidth(12));
  15. _title.textColor = [UIColor colorWithString:@"#FF8523"];
  16. [_title setSingleLineAutoResizeWithMaxWidth:0];
  17. [self.contentView addSubview:_title];
  18. _title.sd_layout
  19. .leftSpaceToView(self.contentView, 15)
  20. .bottomSpaceToView(self.contentView, 15)
  21. .topSpaceToView(self.contentView, 10);
  22. _textfield = [NewControlPackage textFieldInitWithFrame:CGRectMake(0, 0, 0, 0) backgroundImage:nil backgroundColor:NewLineGrayColor textColor:NewGrayColor placeholder:@"" hidden:NO tag:100 font:NewFont(fitScreenWidth(11)) textAlignment:NSTextAlignmentCenter clearButtonMode:UITextFieldViewModeNever clearsOnBeginEditing:NO adjustsFontSizeToFitWidth:NO secureTextEntry:NO keyboardType:UIKeyboardTypeNumbersAndPunctuation returnKeyType:UIReturnKeyDefault userInteractionEnabled:YES];
  23. [self.contentView addSubview:_textfield];
  24. _textfield.sd_layout
  25. .leftSpaceToView(self.contentView, 60)
  26. .centerYEqualToView(_title)
  27. .topSpaceToView(self.contentView, 10)
  28. .bottomSpaceToView(self.contentView, 10)
  29. .widthIs(fitScreenWidth(68));
  30. _Company = [UILabel new];
  31. _Company.textColor = [UIColor colorWithString:@"#A1A1A1"];
  32. _Company.font = NewFont(fitScreenWidth(12));
  33. [_Company setSingleLineAutoResizeWithMaxWidth:0];
  34. [self.contentView addSubview:_Company];
  35. _Company.sd_layout
  36. .leftSpaceToView(_textfield, 10)
  37. .centerYEqualToView(_textfield)
  38. .topSpaceToView(self.contentView, 10)
  39. .bottomSpaceToView(self.contentView, 10);
  40. }
  41. return self;
  42. }
  43. - (void)awakeFromNib {
  44. [super awakeFromNib];
  45. // Initialization code
  46. }
  47. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  48. [super setSelected:selected animated:animated];
  49. // Configure the view for the selected state
  50. }
  51. @end