12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // ZBSliderCell.m
- // ZBProject
- //
- // Created by 学丽 on 2019/4/8.
- // Copyright © 2019 ZB. All rights reserved.
- //
- #import "ZBSliderCell.h"
- @implementation ZBSliderCell
- -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
- {
- self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- [self addSubview:self.img];
- [self addSubview:self.titleLabel];
- [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(27);
- make.top.mas_offset(13);
- make.width.height.mas_equalTo(22);
-
- }];
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.img.mas_right).offset(15);
- make.top.mas_offset(14);
- make.height.mas_equalTo(22);
- }];
- }
- return self;
- }
- -(UIImageView *)img
- {
- if (!_img) {
- _img =[[UIImageView alloc]init];
- _img.image=[UIImage imageNamed:@""];
-
- }
- return _img;
- }
- -(UILabel *)titleLabel
- {
- if (!_titleLabel) {
- _titleLabel=[[UILabel alloc]init];
- _titleLabel.textColor=[UIColor YHColorWithHex:0x333333];
- _titleLabel.text=@"";
- _titleLabel.font=[UIFont systemFontOfSize:16];
-
- }
- return _titleLabel;
- }
- @end
|