uploadFileRecordEditBottomView.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // uploadFileRecordEditBottomView.m
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2023/11/20.
  6. //
  7. #import "uploadFileRecordEditBottomView.h"
  8. @implementation uploadFileRecordEditBottomView
  9. - (id)initWithFrame:(CGRect)frame{
  10. self = [super initWithFrame:frame];
  11. [self drawAnyView];
  12. return self;
  13. }
  14. - (void)drawAnyView{
  15. [self setBackgroundColor:[UIColor whiteColor]];
  16. self.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor;
  17. self.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.0200].CGColor;
  18. self.layer.shadowOffset = CGSizeMake(0,-1);
  19. self.layer.shadowOpacity = 1;
  20. self.layer.shadowRadius = 1;
  21. //删除
  22. NSString* curImgUploadStr = [[NSString alloc] initWithFormat:@"%@ %@",@" ",NSLocalizedString(@"File_upload_Record_delete",nil)];
  23. UIButton *deleteBut = [[UIButton alloc] init];
  24. [deleteBut setImage:[UIImage imageNamed:@"common_red_delete"] forState:UIControlStateNormal];
  25. [deleteBut setTitle:curImgUploadStr forState:UIControlStateNormal];
  26. [deleteBut setTitleColor:[UIColor hwColor:@"#FF4742" alpha:1.0] forState:UIControlStateNormal];
  27. deleteBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
  28. [deleteBut addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
  29. [self addSubview:deleteBut];
  30. [deleteBut mas_makeConstraints:^(MASConstraintMaker *make) {
  31. make.left.mas_equalTo(0);
  32. make.right.mas_equalTo(0);
  33. make.height.mas_equalTo(60);
  34. make.top.mas_equalTo(0);
  35. }];
  36. }
  37. -(void)didClickButFun:(UIButton*)but
  38. {
  39. if(_didClickButFun){
  40. _didClickButFun();
  41. }
  42. }
  43. @end