// // uploadFileRecordTableViewHeadView.m // 隐私保护 // // Created by xd h on 2023/11/20. // #import "uploadFileRecordTableViewHeadView.h" @implementation uploadFileRecordTableViewHeadView - (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; [self drawAnyView]; return self; } - (void)drawAnyView{ [self setBackgroundColor:[UIColor whiteColor]]; _titleLabel = [[UILabel alloc] init]; _titleLabel.textColor = [UIColor hwColor:@"#666666" alpha:1.0]; _titleLabel.font = [UIFont systemFontOfSize:12.0]; [self addSubview:_titleLabel]; [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(15); make.right.mas_equalTo(100); make.top.mas_equalTo(0); make.bottom.mas_equalTo(0); }]; _rightButton = [[UIButton alloc] init]; [_rightButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal]; _rightButton.titleLabel.font = [UIFont systemFontOfSize:12.0]; _rightButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; [_rightButton addTarget:self action:@selector(didiClikButFun:) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:_rightButton]; [_rightButton mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(150); make.right.mas_equalTo(-15); make.top.mas_equalTo(0); make.bottom.mas_equalTo(0); }]; } - (void)didiClikButFun:(UIButton*)but { if(_didClickButFun){ _didClickButFun(); } } @end