12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // uploadFileRecordEditBottomView.m
- // 隐私保护
- //
- // Created by xd h on 2023/11/20.
- //
- #import "uploadFileRecordEditBottomView.h"
- @implementation uploadFileRecordEditBottomView
- - (id)initWithFrame:(CGRect)frame{
- self = [super initWithFrame:frame];
-
- [self drawAnyView];
-
- return self;
- }
- - (void)drawAnyView{
- [self setBackgroundColor:[UIColor whiteColor]];
-
- self.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor;
- self.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.0200].CGColor;
- self.layer.shadowOffset = CGSizeMake(0,-1);
- self.layer.shadowOpacity = 1;
- self.layer.shadowRadius = 1;
-
- //删除
- NSString* curImgUploadStr = [[NSString alloc] initWithFormat:@"%@ %@",@" ",NSLocalizedString(@"File_upload_Record_delete",nil)];
- UIButton *deleteBut = [[UIButton alloc] init];
- [deleteBut setImage:[UIImage imageNamed:@"common_red_delete"] forState:UIControlStateNormal];
- [deleteBut setTitle:curImgUploadStr forState:UIControlStateNormal];
- [deleteBut setTitleColor:[UIColor hwColor:@"#FF4742" alpha:1.0] forState:UIControlStateNormal];
- deleteBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
- [deleteBut addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
- [self addSubview:deleteBut];
-
- [deleteBut mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.height.mas_equalTo(60);
- make.top.mas_equalTo(0);
- }];
- }
- -(void)didClickButFun:(UIButton*)but
- {
- if(_didClickButFun){
- _didClickButFun();
- }
- }
- @end
|