WarDetailCell.m 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // WarDetailCell.m
  3. // LN_School
  4. //
  5. // Created by EchoShacolee on 2017/8/12.
  6. // Copyright © 2017年 Danson. All rights reserved.
  7. //
  8. #import "WarDetailCell.h"
  9. @implementation WarDetailCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. self.selectionStyle = UITableViewCellSelectionStyleNone;
  13. }
  14. //多选状态
  15. - (void)layoutSubviews
  16. {
  17. [super layoutSubviews];
  18. for (UIControl *control in self.subviews) {
  19. if (![control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]){
  20. continue;
  21. }
  22. for (UIView *subView in control.subviews) {
  23. if (![subView isKindOfClass: [UIImageView class]]) {
  24. continue;
  25. }
  26. [subView setValue:defGreen forKey:@"tintColor"];
  27. // UIImageView *imageView = (UIImageView *)subView;
  28. // if (self.selected) {
  29. // imageView.image = [UIImage imageNamed:@"ic_squSelect_h"]; // 选中时的图片
  30. // } else {
  31. // imageView.image = [UIImage imageNamed:@"ic_squSelect"]; // 未选中时的图片
  32. // }
  33. }
  34. }
  35. }
  36. -(void)setDic:(NSDictionary *)dic{
  37. /*
  38. CRDATE = "2017-08-08 00:00:00";
  39. ID = 2;
  40. LICNUM = "";
  41. SIM = 13805910002;
  42. STATUS = 1;
  43. */
  44. _dic = dic;
  45. _LicNumLab.text = [NSString stringWithFormat:@"%@",dic[@"LICNUM"]];
  46. if ([dic[@"STATUS"] isEqualToString:@"0"]) {
  47. _statuLab.text = @"已解除";
  48. _statuLab.textColor = [UIColor darkGrayColor];
  49. }else{
  50. _statuLab.text = @"未解除";
  51. _statuLab.textColor = [UIColor redColor];
  52. }
  53. _simLab.text =[NSString stringWithFormat:@"手机:%@",dic[@"SIM"]];
  54. _dateLab.text = dic[@"CRDATE"];
  55. }
  56. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  57. [super setSelected:selected animated:animated];
  58. // Configure the view for the selected state
  59. }
  60. @end