YOUPAILCImageDeleteView.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // YOUPAILCImageDeleteView.m
  3. // LiveChat
  4. //
  5. // Created by 张灿 on 2018/8/28.
  6. // Copyright © 2018年 caicai. All rights reserved.
  7. //
  8. #import "YOUPAILCImageDeleteView.h"
  9. @interface YOUPAILCImageDeleteView()
  10. @property(nonatomic,strong)UILabel* youpaiptipLabel;
  11. @property(nonatomic,strong)UIImageView* youpaipiconImgV;
  12. @property(nonatomic,strong)UIView* youpaipmaskView;
  13. @end
  14. @implementation YOUPAILCImageDeleteView
  15. - (instancetype)initWithFrame:(CGRect)frame
  16. {
  17. self = [super initWithFrame:frame];
  18. if (self) {
  19. [self youpaifsetupView];
  20. }
  21. return self;
  22. }
  23. - (void)youpaifsetupView{
  24. self.backgroundColor =LCRedColor;
  25. UILabel* txt = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
  26. txt.font = LCFont14;
  27. txt.textColor = [UIColor whiteColor];
  28. txt.text = @"拖动到此处删除";
  29. txt.textAlignment = NSTextAlignmentCenter;
  30. self.youpaiptipLabel = txt;
  31. [self addSubview:txt];
  32. self.youpaipmaskView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
  33. self.youpaipmaskView.backgroundColor = HexColorFromRGBA(0x000000, 0.5);
  34. [self addSubview:self.youpaipmaskView];
  35. self.youpaipmaskView.hidden = YES;
  36. }
  37. - (void)setYoupaipstatu:(NSInteger)statu{
  38. _youpaipstatu = statu;
  39. if (statu==1) {
  40. self.youpaipmaskView.hidden = YES;
  41. self.youpaiptipLabel.text = @"拖动到此处删除";
  42. }else{
  43. self.youpaipmaskView.hidden = NO;
  44. self.youpaiptipLabel.text = @"松开即可删除";
  45. }
  46. }
  47. @end