// // GroupSquareCell.m // smartRhino // // Created by niuzhen on 2020/5/6. // Copyright © 2020 tederen. All rights reserved. // #import "GroupSquareCell.h" @implementation GroupSquareCell - (void)awakeFromNib { [super awakeFromNib]; self.JoinBtn.layer.cornerRadius = 2.f; self.JoinBtn.layer.borderWidth = 0.5f; self.JoinBtn.layer.borderColor = UIColorHex(0x13A3FF).CGColor; self.JoinBtn.layer.masksToBounds = YES; } + (CGFloat)configCell0Height { return 60.f; } + (CGFloat)configCell1Height { return 98.f; } + (GroupSquareCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"GroupSquareCell0"; GroupSquareCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"GroupSquareCell" owner:nil options:nil] objectAtIndex:0]; } return cell; } + (GroupSquareCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"GroupSquareCell1"; GroupSquareCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"GroupSquareCell" owner:nil options:nil] objectAtIndex:1]; } return cell; } - (void)setLeftDataModel:(GroupSquareModel *)model { self.BlueView.hidden = !model.isSelect; if (model.isSelect) { self.NameL.textColor = UIColorHex(0x262626); self.contentView.backgroundColor = UIColorHex(0xffffff); self.NameL.font = [UIFont systemFontOfSize:15]; }else{ self.NameL.textColor = UIColorHex(0x333333); self.contentView.backgroundColor = UIColorHex(0xF2F2F2); self.NameL.font = [UIFont systemFontOfSize:13]; } self.NameL.text = model.Title; } - (void)setRightDataModel:(GroupSquareModel *)model { self.titleL.text = model.Title; self.userCountL.text = @"1.8k"; self.TopicCountL.text = @"326"; self.subTitleL.text = model.Des; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end