DeviceconfigTableViewCell.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // DeviceconfigTableViewCell.m
  3. // FunSDKDemo
  4. //
  5. // Created by Levi on 2018/5/18.
  6. // Copyright © 2018年 Levi. All rights reserved.
  7. //
  8. #import "DeviceconfigTableViewCell.h"
  9. #import "Header.h"
  10. @implementation DeviceconfigTableViewCell
  11. - (UIImageView *)logoImageView {
  12. if (!_logoImageView) {
  13. _logoImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 8, 44, 44)];
  14. _logoImageView.image = [UIImage imageNamed:@"icon_funsdk.png"];
  15. }
  16. return _logoImageView;
  17. }
  18. - (UILabel *)Labeltext {
  19. if (!_Labeltext) {
  20. _Labeltext = [[UILabel alloc] initWithFrame:CGRectMake(64, 9, ScreenWidth - 64, 22)];
  21. }
  22. return _Labeltext;
  23. }
  24. - (UILabel *)detailLabel {
  25. if (!_detailLabel) {
  26. _detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(64, 34, ScreenWidth - 64, 15)];
  27. _detailLabel.font = [UIFont systemFontOfSize:12];
  28. _detailLabel.textColor = [UIColor grayColor];
  29. }
  30. return _detailLabel;
  31. }
  32. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  33. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  34. if (self) {
  35. [self configSubView];
  36. }
  37. return self;
  38. }
  39. - (void)configSubView {
  40. [self.contentView addSubview:self.logoImageView];
  41. [self.contentView addSubview:self.Labeltext];
  42. [self.contentView addSubview:self.detailLabel];
  43. }
  44. @end