WarDetailCell.m 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. - (void)layoutSubviews
  15. {
  16. [super layoutSubviews];
  17. for (UIControl *control in self.subviews) {
  18. if (![control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]){
  19. continue;
  20. }
  21. for (UIView *subView in control.subviews) {
  22. if (![subView isKindOfClass: [UIImageView class]]) {
  23. continue;
  24. }
  25. [subView setValue:RQMianColor forKey:@"tintColor"];
  26. // UIImageView *imageView = (UIImageView *)subView;
  27. // if (self.selected) {
  28. // imageView.image = [UIImage imageNamed:@"ic_squSelect_h"]; // 选中时的图片
  29. // } else {
  30. // imageView.image = [UIImage imageNamed:@"ic_squSelect"]; // 未选中时的图片
  31. // }
  32. }
  33. }
  34. }
  35. -(void)setDic:(NSDictionary *)dic{
  36. /*
  37. CRDATE = "2017-08-08 00:00:00";
  38. ID = 2;
  39. LICNUM = "";
  40. SIM = 13805910002;
  41. STATUS = 1;
  42. */
  43. _dic = dic;
  44. _LicNumLab.text = [NSString stringWithFormat:@"%@",dic[@"LICNUM"]];
  45. if ([dic[@"STATUS"] isEqualToString:@"0"]) {
  46. _statuLab.text = @"已解除";
  47. _statuLab.textColor = [UIColor darkGrayColor];
  48. }else{
  49. _statuLab.text = @"未解除";
  50. _statuLab.textColor = [UIColor redColor];
  51. }
  52. _simLab.text =[NSString stringWithFormat:@"手机: %@",dic[@"SIM"]];;
  53. _dateLab.text = dic[@"CRDATE"];
  54. }
  55. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  56. [super setSelected:selected animated:animated];
  57. // Configure the view for the selected state
  58. }
  59. @end