123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- //
- // shareRecordTableViewCell.m
- // 双子星云手机
- //
- // Created by xd h on 2024/5/14.
- //
- #import "shareRecordTableViewCell.h"
- @interface shareRecordTableViewCell ()
- @property(nonatomic,strong)UIImageView *mImageView;
- @property(nonatomic,strong)UILabel *titleLabel;
- @property(nonatomic,strong)UILabel *titleLabel2;
- @property(nonatomic,strong)UIImageView *rightImage;
- @property(nonatomic,strong)UIImageView *lockImageView;
- @property(nonatomic,strong)UILabel *stateLabel;
- @end
- @implementation shareRecordTableViewCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
- {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
-
- if (self)
- {
- [self drawView];
- }
-
- return self;
- }
- - (void)drawView
- {
-
- /*图片*/
- _mImageView = [[UIImageView alloc] init];
- [_mImageView setBackgroundColor:[UIColor clearColor]];
- _mImageView.image = [UIImage imageNamed:@"uploadFile_file_icon"];
- [self.contentView addSubview:_mImageView];
- [_mImageView setContentMode:(UIViewContentModeScaleAspectFit)];
- [_mImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(15);
- make.width.mas_equalTo(36);
- make.height.mas_equalTo(36);
- make.centerY.equalTo(self.mas_centerY);
- }];
-
- /*右侧箭头*/
- _rightImage = [[UIImageView alloc] init];
- [_rightImage setBackgroundColor:[UIColor clearColor]];
- [_rightImage setImage:[UIImage imageNamed:@"cell_right_access"]];
- [self.contentView addSubview:_rightImage];
- [_rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(28);
- make.right.mas_equalTo(-15.f);
- make.height.mas_equalTo(28);
- make.centerY.equalTo(self.mas_centerY);
- }];
-
- _stateLabel = [[UILabel alloc] init];
- [self.contentView addSubview:_stateLabel];
- _stateLabel.textAlignment = NSTextAlignmentRight;
- _stateLabel.font = [UIFont systemFontOfSize:12.f];
- [_stateLabel setTextColor:HW666666Color]; //#01B7EA
- [_stateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(60);
- make.right.equalTo(_rightImage.mas_left).offset(-5.f);
- make.centerY.equalTo(self.mas_centerY);
- //make.top.mas_equalTo(15.f);
- }];
-
- _stateLabel.text = @"已失效";
-
- /**标题*/
- _titleLabel = [[UILabel alloc] init];
- [self.contentView addSubview:_titleLabel];
- _titleLabel.font = [UIFont boldSystemFontOfSize:14.f];
- _titleLabel.numberOfLines = 1;
- [_titleLabel setTextColor:HW0A132BColor];
- [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(_mImageView.mas_right).offset(5.f);
- make.right.equalTo(_stateLabel.mas_left).offset(-5.f);
- //make.centerY.equalTo(self.mas_centerY);
- make.top.mas_equalTo(15.f);
- }];
-
- _titleLabel.text = @"banner.png等多个文件";
-
- _lockImageView = [[UIImageView alloc] init];
- [_lockImageView setImage:[UIImage imageNamed:@"share_lock_icon"]];
- [self.contentView addSubview:_lockImageView];
- [_lockImageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.width.mas_equalTo(16);
- make.height.mas_equalTo(16);
- make.left.equalTo(_titleLabel.mas_left);
- make.top.equalTo(_titleLabel.mas_bottom).offset(5);
- }];
-
- /**副标题*/
- _titleLabel2 = [[UILabel alloc] init];
- [self.contentView addSubview:_titleLabel2];
- _titleLabel2.font = [UIFont systemFontOfSize:12.f];
- //[titleLabel2 setTextAlignment:(NSTextAlignmentRight)];
- [_titleLabel2 setTextColor:HW666666Color];
- [_titleLabel2 mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(_titleLabel.mas_right);
- make.left.equalTo(_lockImageView.mas_right);
- make.centerY.equalTo(_lockImageView.mas_centerY);
- make.height.mas_equalTo(16);
- }];
-
- _titleLabel2.text = @"2024/04/25 19:45";
-
- }
- @end
|