123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // YOUPAILCImageDeleteView.m
- // LiveChat
- //
- // Created by 张灿 on 2018/8/28.
- // Copyright © 2018年 caicai. All rights reserved.
- //
- #import "YOUPAILCImageDeleteView.h"
- @interface YOUPAILCImageDeleteView()
- @property(nonatomic,strong)UILabel* youpaiptipLabel;
- @property(nonatomic,strong)UIImageView* youpaipiconImgV;
- @property(nonatomic,strong)UIView* youpaipmaskView;
- @end
- @implementation YOUPAILCImageDeleteView
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- [self youpaifsetupView];
- }
- return self;
- }
- - (void)youpaifsetupView{
- self.backgroundColor =LCRedColor;
- UILabel* txt = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
- txt.font = LCFont14;
- txt.textColor = [UIColor whiteColor];
- txt.text = @"拖动到此处删除";
- txt.textAlignment = NSTextAlignmentCenter;
- self.youpaiptipLabel = txt;
- [self addSubview:txt];
-
- self.youpaipmaskView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 50)];
- self.youpaipmaskView.backgroundColor = HexColorFromRGBA(0x000000, 0.5);
- [self addSubview:self.youpaipmaskView];
- self.youpaipmaskView.hidden = YES;
- }
- - (void)setYoupaipstatu:(NSInteger)statu{
- _youpaipstatu = statu;
- if (statu==1) {
- self.youpaipmaskView.hidden = YES;
- self.youpaiptipLabel.text = @"拖动到此处删除";
- }else{
- self.youpaipmaskView.hidden = NO;
- self.youpaiptipLabel.text = @"松开即可删除";
- }
- }
- @end
|