123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //
- // newNoImageCell.m
- // ZhongJingLianMeng
- //
- // Created by youke on 2018/11/15.
- // Copyright © 2018 youke. All rights reserved.
- //
- #import "newNoImageCell.h"
- #import "newModel.h"
- @implementation newNoImageCell
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
- {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- // Initialization code
- [self makeUI];
- }
- return self;
- }
- -(void)makeUI{
-
-
- _titleLb= [[UILabel alloc]init];
-
- _titleLb.textAlignment = NSTextAlignmentLeft;
-
- _titleLb.font = TextFont(16);
-
- _titleLb.textColor = [UIColor colorWithHexValue:0x333333];
-
- _titleLb.numberOfLines = 0;
-
- _titleLb.text =@"中经联盟武汉分盟正式成立!关于中经联盟地产杰出人物于中经联盟地产杰出人物武汉分盟正式成立!";
-
- [_titleLb setRowSpace:8];
-
- [self.contentView addSubview:_titleLb];
-
- [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
- make.size.mas_equalTo(CGSizeMake(kGScreenWidth -30, 55));
- make.left.equalTo(self.mas_left).with.offset(15);
- make.top.equalTo(self.mas_top).with.offset(10);
-
- }];
- _timeLb = [[UILabel alloc]init];
- _timeLb.textAlignment = NSTextAlignmentLeft;
- _timeLb.font = TextFont(12);
- _timeLb.textColor = [UIColor colorWithHexValue:0x898989];
- _timeLb.text = @"2018-11-15";
- [self.contentView addSubview:_timeLb];
- [_timeLb mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.size.mas_equalTo(CGSizeMake(80, 10));
- make.left.equalTo(self.mas_left).offset(15);
- make.bottom.equalTo(self.mas_bottom).offset(-15);
- }];
-
- UIView *lineView =[[UIView alloc]init];
- lineView.backgroundColor = [[UIColor colorWithHexValue:0xEAEAEA]colorWithAlphaComponent:0.6];
- [self.contentView addSubview:lineView];
- [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.bottom.equalTo(self.mas_bottom).offset(0);
- make.left.equalTo(self.mas_left).offset(10);
- make.size.mas_equalTo(CGSizeMake(kGScreenWidth-20, 1));
- }];
-
- }
- + (newNoImageCell *)cellWith:(newModel*)model
- tableView:(UITableView *)tableView{
- static NSString *cellID = @"CellID2";
- newNoImageCell *cell =
- [tableView dequeueReusableCellWithIdentifier:cellID];
- if (!cell) {
- cell =
- [[newNoImageCell alloc] initWithStyle:UITableViewCellStyleDefault
- reuseIdentifier:cellID];
- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- }
- [cell fillData:model];
- return cell;
- }
- -(void)fillData:(newModel*)model{
- _titleLb.text = model.title;
- _timeLb.text = model.createTime;
-
-
-
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|