// // ChatMsgNoticeCell.m // smartRhino // // Created by armin on 2019/11/4. // Copyright © 2019 tederen. All rights reserved. // #import "ChatMsgNoticeCell.h" @implementation ChatMsgNoticeCell - (void)awakeFromNib { [super awakeFromNib]; self.cell2UserImgView.layer.cornerRadius = 4.f; self.cell2UserImgView.layer.masksToBounds = YES; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } + (CGFloat)configCell0Height{ return 49.5; } + (CGFloat)configCell1Height{ return 63.5; } + (CGFloat)configCell2Height{ return 64; } + (ChatMsgNoticeCell *)configCell0:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell0"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:0]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.cell0SearchBgView.layer.masksToBounds = YES; cell.cell0SearchBgView.layer.cornerRadius = 29.5/2.0; cell.cell0SearchBgView.backgroundColor = RGB(245, 246, 248); return cell; } + (ChatMsgNoticeCell *)configCell1:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell1"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:1]; } cell.IsTopImgV.hidden = YES; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } + (ChatMsgNoticeCell *)configCell2:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell2"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:2]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.cell2RedBgView.layer.masksToBounds = YES; cell.cell2RedBgView.layer.cornerRadius = 5.f; cell.cell2RedBgView.hidden = YES; cell.IsTopImgV.hidden = YES; cell.cell2EditBtn.hidden = YES; cell.cell2TimeLabel.hidden = NO; [cell.cell2EditBtn setTitle:@"编辑" forState:UIControlStateNormal]; return cell; } + (ChatMsgNoticeCell *)configCell10:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell10"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:3]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } + (ChatMsgNoticeCell *)configCell20:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell20"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:4]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.cell2RedBgView.layer.masksToBounds = YES; cell.cell2RedBgView.layer.cornerRadius = 5.f; cell.cell2RedBgView.hidden = YES; cell.cell2EditBtn.hidden = YES; cell.cell2TimeLabel.hidden = NO; [cell.cell2EditBtn setTitle:@"编辑" forState:UIControlStateNormal]; return cell; } + (ChatMsgNoticeCell *)configCell30:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell30"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:5]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } + (ChatMsgNoticeCell *)configCell40:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell40"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:6]; } cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } + (ChatMsgNoticeCell *)configCell50:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifer = @"ChatMsgNoticeCell50"; ChatMsgNoticeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer]; if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ChatMsgNoticeCell" owner:nil options:nil] objectAtIndex:7]; } cell.yanRedNumL.layer.cornerRadius = 8.f; cell.yanRedNumL.layer.masksToBounds = YES; cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } @end