| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- //
- // SearchDeviceCell.m
- // FunSDKDemo
- //
- // Created by wujiangbo on 2018/11/15.
- // Copyright © 2018年 wujiangbo. All rights reserved.
- //
- #import "SearchDeviceCell.h"
- #import <Masonry/Masonry.h>
- @implementation SearchDeviceCell
- #pragma mark - lazyload
- -(UILabel *)nameLab {
- if (!_nameLab) {
- _nameLab = [[UILabel alloc] init];
- _nameLab.textColor = [UIColor blackColor];
- _nameLab.font = [UIFont boldSystemFontOfSize:15];
- }
- return _nameLab;
- }
- -(UILabel *)serialNumLab {
- if (!_serialNumLab) {
- _serialNumLab = [[UILabel alloc] init];
- _serialNumLab.textColor = [UIColor blackColor];
- _serialNumLab.font = [UIFont systemFontOfSize:13 weight:UIFontWeightLight];
- }
- return _serialNumLab;
- }
- -(UILabel *)ipLab {
- if (!_ipLab) {
- _ipLab = [[UILabel alloc] init];
- _ipLab.textColor = [UIColor blackColor];
- _ipLab.font = [UIFont systemFontOfSize:13 weight:UIFontWeightLight];
- }
- return _ipLab;
- }
- #pragma mark - 设置坐标
- -(void)makeUI {
-
- [self.contentView addSubview:self.nameLab];
- [self.contentView addSubview:self.serialNumLab];
- [self.contentView addSubview:self.ipLab];
-
- [self.nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(10);
- make.width.equalTo(@300);
- make.height.equalTo(@20);
- make.top.equalTo(self.contentView).offset(5);
- }];
-
- [self.serialNumLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(10);
- make.width.equalTo(@300);
- make.height.equalTo(@20);
- make.top.equalTo(self.nameLab.mas_bottom).offset(5);
- }];
-
- [self.ipLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self.contentView).offset(10);
- make.width.equalTo(@300);
- make.height.equalTo(@20);
- make.top.equalTo(self.serialNumLab.mas_bottom).offset(5);
- }];
-
- }
- #pragma mark - 初始化
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
-
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- [self makeUI];
- }
-
- return self;
- }
- @end
|