酷店

KDPUserInfoListCell.m 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // KDPUserInfoListCell.m
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/9.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "KDPUserInfoListCell.h"
  9. @implementation KDPUserInfoListCell
  10. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  11. {
  12. self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
  13. if (self) {
  14. [self addSubview:self.nickLabel];
  15. [self addSubview:self.contentLabel];
  16. [self addSubview:self.iconImgV];
  17. [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  18. make.left.mas_equalTo(14);
  19. make.top.bottom.mas_equalTo(0);
  20. }];
  21. [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  22. make.left.mas_equalTo(110);
  23. make.top.bottom.mas_equalTo(0);
  24. }];
  25. [self.iconImgV mas_makeConstraints:^(MASConstraintMaker *make) {
  26. make.left.mas_equalTo(110);
  27. make.width.height.mas_equalTo(33);
  28. make.top.mas_equalTo(12);
  29. }];
  30. UIView *lineV=[[UIView alloc]init];
  31. lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
  32. [self addSubview:lineV];
  33. [lineV mas_makeConstraints:^(MASConstraintMaker *make) {
  34. make.left.mas_equalTo(10);
  35. make.right.mas_equalTo(-10);
  36. make.top.mas_equalTo(self.mas_bottom).offset(-1);
  37. make.height.mas_equalTo(1);
  38. }];
  39. }
  40. return self;
  41. }
  42. -(UILabel *)nickLabel
  43. {
  44. if (!_nickLabel) {
  45. _nickLabel=[[UILabel alloc]init];
  46. _nickLabel.textColor=[UIColor colorWithHexString:@"#3E3E3E"];
  47. _nickLabel.font=[UIFont systemFontOfSize:16];
  48. }
  49. return _nickLabel;
  50. }
  51. -(UILabel *)contentLabel
  52. {
  53. if (!_contentLabel) {
  54. _contentLabel=[[UILabel alloc]init];
  55. _contentLabel.text=@"---";
  56. _contentLabel.font=[UIFont systemFontOfSize:14];
  57. _contentLabel.textColor=[UIColor colorWithHexString:@"#999999"];
  58. _contentLabel.hidden=YES;
  59. }
  60. return _contentLabel;
  61. }
  62. -(UIImageView *)iconImgV
  63. {
  64. if (!_iconImgV ) {
  65. _iconImgV =[[UIImageView alloc]init];
  66. _iconImgV.hidden=YES;
  67. }
  68. return _iconImgV;
  69. }
  70. @end