iOS AILinkBleSDK - 蓝牙SDK
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ELBfsWifiConnectTableViewCell.m 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //
  2. // ELBfsWifiConnectTableViewCell.m
  3. // AILinkBleSDKSourceCode
  4. //
  5. // Created by cliCk on 2021/4/28.
  6. // Copyright © 2021 IOT. All rights reserved.
  7. //
  8. #import "ELBfsWifiConnectTableViewCell.h"
  9. #import "Masonry.h"
  10. @interface ELBfsWifiConnectTableViewCell ()
  11. @property (nonatomic, strong) UILabel *nameLabel, *linkLabel;
  12. @end
  13. @implementation ELBfsWifiConnectTableViewCell
  14. - (void)awakeFromNib {
  15. [super awakeFromNib];
  16. // Initialization code
  17. }
  18. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  19. [super setSelected:selected animated:animated];
  20. // Configure the view for the selected state
  21. }
  22. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  23. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  24. self.nameLabel = [[UILabel alloc] init];
  25. self.nameLabel.textColor = [UIColor blackColor];
  26. [self.contentView addSubview:self.nameLabel];
  27. [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  28. make.left.offset(20);
  29. make.centerY.equalTo(self.contentView.mas_centerY);
  30. }];
  31. self.linkLabel = [[UILabel alloc] init];
  32. self.linkLabel.textColor = [UIColor blueColor];
  33. [self.contentView addSubview:self.linkLabel];
  34. [self.linkLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  35. make.right.offset(-20);
  36. make.centerY.equalTo(self.contentView.mas_centerY);
  37. }];
  38. }
  39. return self;
  40. }
  41. #pragma mark - setter
  42. - (void)setWifiName:(NSString *)wifiName {
  43. self.nameLabel.text = wifiName;
  44. }
  45. - (void)setIsLink:(BOOL)isLink {
  46. if (isLink) {
  47. self.linkLabel.text = @"Connected";
  48. } else {
  49. self.linkLabel.text = @"";
  50. }
  51. }
  52. @end