// // HomeMsgTableViewCell.m // tongxin // // Created by ecell on 2023/7/7. // Copyright © 2023 xTT. All rights reserved. // #import "HomeMsgTableViewCell.h" @interface HomeMsgTableViewCell () @end @implementation HomeMsgTableViewCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.selectionStyle = UITableViewCellSelectionStyleNone; self.backgroundColor = KKClearColor; [self subCellView]; } return self; } - (void)subCellView { UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:12.5 borderWidth:0 borderColor:KKClearColor]; bgView.frame = CGRectMake(20, 15, ScreenWidth-40, 25); [self.contentView addSubview:bgView]; UIImageView *icon = [UICommon ui_imageView:CGRectZero fileName:@"home_cell_icon_remind"]; [bgView addSubview:icon]; [icon mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(bgView).offset(10); make.centerY.equalTo(bgView); make.size.mas_equalTo(icon.image.size); }]; UILabel *titleLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:Font_(12) textColor:KKTextColor text:@"消息中心" Radius:0]; [bgView addSubview:titleLabel]; [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(icon.mas_right).offset(10); make.centerY.equalTo(bgView); }]; } - (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