925 lines
36 KiB
Objective-C
925 lines
36 KiB
Objective-C
//
|
|
// QXRedBagSendView.m
|
|
// QXLive
|
|
//
|
|
// Created by 启星 on 2025/10/10.
|
|
//
|
|
|
|
#import "QXRedBagSendView.h"
|
|
#import <WebKit/WebKit.h>
|
|
#import "QXMineNetwork.h"
|
|
@interface QXRedBagSendView()<UITextFieldDelegate>
|
|
@property (nonatomic,strong)UIView *bgView;
|
|
@property (nonatomic,strong)UIImageView *bgImageView;
|
|
@property (nonatomic,strong)UILabel *titleLabel;
|
|
@property (nonatomic,strong)UIButton *helpBtn;
|
|
@property (nonatomic,strong)UIButton *backBtn;
|
|
@property (nonatomic,strong)UIButton *closeBtn;
|
|
@property (nonatomic,strong)UIButton *nextBtn;
|
|
@property (nonatomic,strong)UIButton *commitBtn;
|
|
|
|
|
|
@property (nonatomic,strong)UIView* firstContentView;
|
|
@property (nonatomic,strong)UIButton *normalRedBagBtn;
|
|
@property (nonatomic,strong)UIButton *pwdRedBagBtn;
|
|
@property (nonatomic,strong)UIView *firstTopView;
|
|
@property (nonatomic,strong)UIView *firstPwdView;
|
|
@property (nonatomic,strong)UITextField *pwdTextField;
|
|
@property (nonatomic,strong)UIView *firstTimeView;
|
|
@property (nonatomic,strong)UIView *scrollBgView;
|
|
@property (nonatomic,strong)UIButton *coinRedBagBtn;
|
|
@property (nonatomic,strong)UIButton *diamondRedBagBtn;
|
|
@property (nonatomic,strong)UIButton *selectedRedBagTimeBtn;
|
|
|
|
/// 红包类型 默认为普通红包 普通红包 1 口令红包 2
|
|
@property (nonatomic,strong)NSString *redBagType;
|
|
/// 红包是否为金币红包 金币红包 1 钻石红包 2
|
|
@property (nonatomic,strong)NSString *redBagContentType;
|
|
/// 红包倒计时
|
|
@property (nonatomic,strong)NSString *redBagTime;
|
|
/// 条件 0 无 1 收藏房间 2 仅麦上用户 多条件时用,隔开
|
|
@property (nonatomic,strong)NSString *conditions;
|
|
@property (nonatomic,strong)NSString *coin;
|
|
@property (nonatomic,strong)NSString *earnings;
|
|
|
|
|
|
@property (nonatomic,strong)UIView* nextContentView;
|
|
@property (nonatomic,strong)UILabel *moneyLabel;
|
|
@property (nonatomic,strong)UILabel *moneyUnitLabel;
|
|
@property (nonatomic,strong)UITextField *moneyTextField;
|
|
@property (nonatomic,strong)UITextField *countTextField;
|
|
@property (nonatomic,strong)UITextField *remarkTextField;
|
|
/// 无
|
|
@property (nonatomic,strong)UIButton *noDrawAuthBtn;
|
|
/// 收藏房间
|
|
@property (nonatomic,strong)UIButton *collectDrawAuthBtn;
|
|
/// 仅麦上用户
|
|
@property (nonatomic,strong)UIButton *upSeatDrawAuthBtn;
|
|
|
|
|
|
|
|
@property (nonatomic,strong)UIView* ruleContentView;
|
|
@property (nonatomic,strong)WKWebView* webView;
|
|
|
|
|
|
@property (nonatomic,strong)NSArray* timeArray;
|
|
|
|
@property (nonatomic,strong)NSArray* drawAuthArray;
|
|
|
|
/// 0 选择红包类型 1 塞红包页面
|
|
@property (nonatomic,assign)NSInteger currentPage;
|
|
|
|
/// 是否为规则页面返回
|
|
@property (nonatomic,assign)BOOL isFromRule;
|
|
@property (nonatomic,assign)BOOL isSendNet;
|
|
@end
|
|
|
|
@implementation QXRedBagSendView
|
|
|
|
- (instancetype)init
|
|
{
|
|
self = [super init];
|
|
if (self) {
|
|
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
|
[self initSubviews];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
-(void)initSubviews{
|
|
/// 默认普通红包
|
|
self.redBagType = @"1";
|
|
/// 默认金币红包
|
|
self.redBagContentType = @"1";
|
|
/// 默认立刻
|
|
self.redBagTime = @"0";
|
|
/// 无限制条件
|
|
self.conditions = @"0";
|
|
self.timeArray = @[@0,@1,@2,@5,@10];
|
|
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
|
|
self.bgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-345)/2, (SCREEN_HEIGHT-454)/2, 345, 454)];
|
|
[self addSubview:self.bgView];
|
|
|
|
self.bgImageView = [[UIImageView alloc] initWithFrame:self.bgView.bounds];
|
|
self.bgImageView.image = [UIImage imageNamed:@"room_send_redbag_bg"];
|
|
[self.bgView addSubview:self.bgImageView];
|
|
|
|
self.titleLabel = [[UILabel alloc] init];
|
|
self.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
self.titleLabel.text = @"直播间红包";
|
|
self.titleLabel.textColor = RGB16(0xffffff);
|
|
[self.bgView addSubview:self.titleLabel];
|
|
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.centerX.equalTo(self.bgView);
|
|
make.top.mas_equalTo(15);
|
|
make.height.mas_equalTo(26);
|
|
}];
|
|
|
|
self.helpBtn = [[UIButton alloc] init];
|
|
[self.helpBtn setImage:[UIImage imageNamed:@"room_redbag_help"] forState:(UIControlStateNormal)];
|
|
[self.helpBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.bgView addSubview:self.helpBtn];
|
|
[self.helpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.height.mas_equalTo(40);
|
|
make.centerY.equalTo(self.titleLabel);
|
|
make.left.mas_equalTo(5);
|
|
}];
|
|
|
|
self.backBtn = [[UIButton alloc] init];
|
|
[self.backBtn setImage:[UIImage imageNamed:@"room_redbag_back"] forState:(UIControlStateNormal)];
|
|
[self.backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.bgView addSubview:self.backBtn];
|
|
self.backBtn.hidden = YES;
|
|
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.equalTo(self.helpBtn);
|
|
}];
|
|
|
|
self.closeBtn = [[UIButton alloc] init];
|
|
[self.closeBtn setImage:[UIImage imageNamed:@"room_redbag_close"] forState:(UIControlStateNormal)];
|
|
[self.closeBtn addTarget:self action:@selector(closeAction) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.bgView addSubview:self.closeBtn];
|
|
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.height.mas_equalTo(40);
|
|
make.centerY.equalTo(self.titleLabel);
|
|
make.right.mas_equalTo(-5);
|
|
}];
|
|
|
|
self.nextBtn = [[UIButton alloc] init];
|
|
[self.nextBtn setTitle:@"下一步" forState:(UIControlStateNormal)];
|
|
self.nextBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
[self.nextBtn addTarget:self action:@selector(nextAction) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.nextBtn setTitleColor:RGB16(0xF35248) forState:UIControlStateNormal];
|
|
[self.nextBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_next_btn_bg"] forState:(UIControlStateNormal)];
|
|
[self.bgView addSubview:self.nextBtn];
|
|
[self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.height.mas_equalTo(44);
|
|
make.left.mas_equalTo(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.bottom.mas_equalTo(-15);
|
|
}];
|
|
|
|
self.commitBtn = [[UIButton alloc] init];
|
|
[self.commitBtn setTitle:@"发红包" forState:(UIControlStateNormal)];
|
|
self.commitBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
self.commitBtn.hidden = YES;
|
|
[self.commitBtn addTarget:self action:@selector(commitAction) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.commitBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_next_btn_bg"] forState:(UIControlStateNormal)];
|
|
[self.commitBtn setTitleColor:RGB16(0xF35248) forState:UIControlStateNormal];
|
|
[self.bgView addSubview:self.commitBtn];
|
|
[self.commitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.equalTo(self.nextBtn);
|
|
}];
|
|
|
|
[self initFirstContentView];
|
|
|
|
[self initNextContentView];
|
|
|
|
[self initRuleView];
|
|
|
|
[self getMyWallet];
|
|
}
|
|
|
|
-(void)getMyWallet{
|
|
MJWeakSelf
|
|
[QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) {
|
|
weakSelf.coin = coin;
|
|
weakSelf.earnings = coin;
|
|
weakSelf.moneyLabel.text = [NSString stringWithFormat:@"%@金币可用",self.coin];
|
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
|
|
|
}];
|
|
}
|
|
|
|
-(void)initFirstContentView{
|
|
self.firstContentView = [[UIView alloc] init];
|
|
[self.bgView addSubview:self.firstContentView];
|
|
[self.firstContentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(self.titleLabel.mas_bottom).offset(15);
|
|
make.left.mas_equalTo(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.bottom.equalTo(self.nextBtn.mas_top).offset(-15);
|
|
}];
|
|
|
|
|
|
UIView *topView = [[UIView alloc] init];
|
|
topView.backgroundColor = RGB16(0xffffff);
|
|
topView.layer.masksToBounds = YES;
|
|
topView.layer.cornerRadius = 8;
|
|
[self.firstContentView addSubview:topView];
|
|
self.firstTopView = topView;
|
|
[topView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.left.right.equalTo(self.firstContentView);
|
|
make.height.mas_equalTo(88);
|
|
}];
|
|
|
|
UILabel *topTitleLabel = [[UILabel alloc] init];
|
|
topTitleLabel.text = @"参与领取限制";
|
|
topTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
topTitleLabel.textColor = RGB16(0x666666);
|
|
[topView addSubview:topTitleLabel];
|
|
[topTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.top.mas_equalTo(11);
|
|
make.height.mas_equalTo(26);
|
|
}];
|
|
|
|
UIButton *normalRedBagBtn = [[UIButton alloc] init];
|
|
normalRedBagBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15];
|
|
[normalRedBagBtn setTitle:@"普通红包" forState:(UIControlStateNormal)];
|
|
[normalRedBagBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
|
[normalRedBagBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_btn_bg_nor"] forState:(UIControlStateNormal)];
|
|
[normalRedBagBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_btn_bg_sel"] forState:(UIControlStateSelected)];
|
|
[normalRedBagBtn addTarget:self action:@selector(selectedRedBagTypeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[topView addSubview:normalRedBagBtn];
|
|
self.normalRedBagBtn = normalRedBagBtn;
|
|
[normalRedBagBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.bottom.mas_equalTo(-5);
|
|
make.height.mas_equalTo(36);
|
|
make.width.mas_equalTo(137);
|
|
}];
|
|
|
|
UIButton *pwdRedBagBtn = [[UIButton alloc] init];
|
|
pwdRedBagBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15];
|
|
[pwdRedBagBtn setTitle:@"口令红包" forState:(UIControlStateNormal)];
|
|
[pwdRedBagBtn addTarget:self action:@selector(selectedRedBagTypeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[pwdRedBagBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
|
[pwdRedBagBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_btn_bg_nor"] forState:(UIControlStateNormal)];
|
|
[pwdRedBagBtn setBackgroundImage:[UIImage imageNamed:@"red_bag_btn_bg_sel"] forState:(UIControlStateSelected)];
|
|
[topView addSubview:pwdRedBagBtn];
|
|
self.pwdRedBagBtn = pwdRedBagBtn;
|
|
[pwdRedBagBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.right.mas_equalTo(-15);
|
|
make.bottom.mas_equalTo(-5);
|
|
make.height.mas_equalTo(36);
|
|
make.width.mas_equalTo(137);
|
|
}];
|
|
|
|
UIView *centerView1 = [[UIView alloc] init];
|
|
centerView1.backgroundColor = RGB16(0xffffff);
|
|
centerView1.layer.masksToBounds = YES;
|
|
centerView1.layer.cornerRadius = 8;
|
|
[self.firstContentView addSubview:centerView1];
|
|
self.firstPwdView = centerView1;
|
|
[centerView1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(topView.mas_bottom).offset(12);
|
|
make.left.right.equalTo(self.firstContentView);
|
|
make.height.mas_equalTo(48);
|
|
}];
|
|
|
|
UILabel *pwdTitleLabel = [[UILabel alloc] init];
|
|
pwdTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
pwdTitleLabel.text = @"口令";
|
|
pwdTitleLabel.textColor = RGB16(0x666666);
|
|
[self.firstPwdView addSubview:pwdTitleLabel];
|
|
[pwdTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.centerY.equalTo(self.firstPwdView);
|
|
make.width.mas_equalTo(40);
|
|
}];
|
|
|
|
UITextField *pwdTextField = [[UITextField alloc] init];
|
|
pwdTextField.font = [UIFont boldSystemFontOfSize:18];
|
|
pwdTextField.delegate = self;
|
|
pwdTextField.textColor = RGB16(0x666666);
|
|
pwdTextField.textAlignment = NSTextAlignmentRight;
|
|
pwdTextField.returnKeyType = UIReturnKeyDone;
|
|
pwdTextField.placeholder = @"请输入口令";
|
|
self.pwdTextField = pwdTextField;
|
|
[self.firstPwdView addSubview:pwdTextField];
|
|
[pwdTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(pwdTitleLabel.mas_right).offset(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.top.bottom.equalTo(self.firstPwdView);
|
|
}];
|
|
|
|
|
|
UIView *centerView2 = [[UIView alloc] init];
|
|
centerView2.backgroundColor = RGB16(0xffffff);
|
|
centerView2.layer.masksToBounds = YES;
|
|
centerView2.layer.cornerRadius = 8;
|
|
self.firstTimeView = centerView2;
|
|
[self.firstContentView addSubview:centerView2];
|
|
[centerView2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(topView.mas_bottom).offset(72);
|
|
make.left.right.equalTo(self.firstContentView);
|
|
make.height.mas_equalTo(88);
|
|
}];
|
|
|
|
UILabel *timeTitleLabel = [[UILabel alloc] init];
|
|
timeTitleLabel.textColor = RGB16(0x666666);
|
|
timeTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
timeTitleLabel.text = @"开奖倒计时";
|
|
[self.firstTimeView addSubview:timeTitleLabel];
|
|
[timeTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.top.mas_equalTo(11);
|
|
make.height.mas_equalTo(26);
|
|
}];
|
|
|
|
CGFloat btnWidth = 49;
|
|
CGFloat leftMargin = 15;
|
|
CGFloat btnSpace = 10;
|
|
CGFloat btnHeight = 36;
|
|
for (int i = 0; i < self.timeArray.count ; i++) {
|
|
UIButton *btn = [[UIButton alloc] init];
|
|
NSNumber *number = self.timeArray[i];
|
|
btn.tag = number.intValue+10;
|
|
NSString *title = @"立刻";
|
|
if (number.intValue>0) {
|
|
title = [NSString stringWithFormat:@"%d分钟",number.intValue];
|
|
}
|
|
[btn setTitle:title forState:(UIControlStateNormal)];
|
|
[btn setBackgroundImage:[UIImage imageNamed:@"red_bag_time_btn_bg_nor"] forState:(UIControlStateNormal)];
|
|
[btn setBackgroundImage:[UIImage imageNamed:@"red_bag_time_btn_bg_sel"] forState:(UIControlStateSelected)];
|
|
btn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
|
|
[btn addTarget:self action:@selector(redBagTimeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[self.firstTimeView addSubview:btn];
|
|
// 首次选中立刻
|
|
if (i == 0) {
|
|
btn.selected = YES;
|
|
self.selectedRedBagTimeBtn = btn;
|
|
}
|
|
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(leftMargin+(btnWidth+btnSpace)*i);
|
|
make.width.mas_equalTo(btnWidth);
|
|
make.height.mas_equalTo(btnHeight);
|
|
make.bottom.mas_equalTo(-5);
|
|
}];
|
|
}
|
|
|
|
UIView *bottomView = [[UIView alloc] init];
|
|
bottomView.backgroundColor = RGB16(0xffffff);
|
|
bottomView.layer.masksToBounds = YES;
|
|
bottomView.layer.cornerRadius = 8;
|
|
[self.firstContentView addSubview:bottomView];
|
|
[bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(centerView2.mas_bottom).offset(12);
|
|
make.left.right.equalTo(self.firstContentView);
|
|
make.height.mas_equalTo(48);
|
|
}];
|
|
|
|
UILabel *redBagTypeLabel = [[UILabel alloc] init];
|
|
redBagTypeLabel.textColor = RGB16(0x666666);
|
|
redBagTypeLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
redBagTypeLabel.text = @"红包类型";
|
|
[bottomView addSubview:redBagTypeLabel];
|
|
[redBagTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.centerY.equalTo(bottomView);
|
|
}];
|
|
|
|
UIView *redBagTypeView = [[UIView alloc] init];
|
|
redBagTypeView.backgroundColor = RGB16(0xBA230A);
|
|
redBagTypeView.layer.masksToBounds = YES;
|
|
redBagTypeView.layer.cornerRadius = 13;
|
|
[bottomView addSubview:redBagTypeView];
|
|
[redBagTypeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.mas_equalTo(130);
|
|
make.height.mas_equalTo(26);
|
|
make.centerY.equalTo(bottomView);
|
|
make.right.mas_equalTo(-15);
|
|
}];
|
|
|
|
UIView *scrollBgView = [[UIView alloc] init];
|
|
scrollBgView.backgroundColor = RGB16(0xFDE8A3);
|
|
scrollBgView.layer.masksToBounds = YES;
|
|
scrollBgView.layer.cornerRadius = 13;
|
|
[redBagTypeView addSubview:scrollBgView];
|
|
self.scrollBgView = scrollBgView;
|
|
[scrollBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.mas_equalTo(66);
|
|
make.top.bottom.equalTo(redBagTypeView);
|
|
make.left.equalTo(redBagTypeView);
|
|
}];
|
|
|
|
self.coinRedBagBtn = [[UIButton alloc] init];
|
|
[self.coinRedBagBtn setTitle:@"金币红包" forState:(UIControlStateNormal)];
|
|
self.coinRedBagBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
|
[self.coinRedBagBtn setTitleColor:RGB16(0xD01717) forState:(UIControlStateSelected)];
|
|
[self.coinRedBagBtn setTitleColor:RGB16(0xFFC9C7) forState:(UIControlStateNormal)];
|
|
self.coinRedBagBtn.selected = YES;
|
|
[self.coinRedBagBtn addTarget:self action:@selector(redBagContentTypeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[redBagTypeView addSubview:self.coinRedBagBtn];
|
|
[self.coinRedBagBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(redBagTypeView);
|
|
make.width.mas_equalTo(66);
|
|
make.top.bottom.equalTo(redBagTypeView);
|
|
}];
|
|
|
|
self.diamondRedBagBtn = [[UIButton alloc] init];
|
|
[self.diamondRedBagBtn setTitle:@"钻石红包" forState:(UIControlStateNormal)];
|
|
self.diamondRedBagBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
|
[self.diamondRedBagBtn setTitleColor:RGB16(0xD01717) forState:(UIControlStateSelected)];
|
|
[self.diamondRedBagBtn setTitleColor:RGB16(0xFFC9C7) forState:(UIControlStateNormal)];
|
|
[self.diamondRedBagBtn addTarget:self action:@selector(redBagContentTypeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[redBagTypeView addSubview:self.diamondRedBagBtn];
|
|
[self.diamondRedBagBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.right.equalTo(redBagTypeView);
|
|
make.width.mas_equalTo(66);
|
|
make.top.bottom.equalTo(redBagTypeView);
|
|
}];
|
|
|
|
[self selectedRedBagTypeAction:self.normalRedBagBtn];
|
|
}
|
|
|
|
-(void)initNextContentView{
|
|
self.drawAuthArray = @[@0,@1,@2];
|
|
self.nextContentView = [[UIView alloc] init];
|
|
self.nextContentView.hidden = YES;
|
|
[self.bgView addSubview:self.nextContentView];
|
|
[self.nextContentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(self.titleLabel.mas_bottom).offset(15);
|
|
make.left.mas_equalTo(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.bottom.equalTo(self.nextBtn.mas_top).offset(-15);
|
|
}];
|
|
|
|
self.moneyLabel = [[UILabel alloc] init];
|
|
self.moneyLabel.font = [UIFont boldSystemFontOfSize:13];
|
|
self.moneyLabel.textColor = RGB16(0xffffff);
|
|
self.moneyLabel.text = @"-金币可用";
|
|
[self.nextContentView addSubview:self.moneyLabel];
|
|
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.right.equalTo(self.nextContentView).offset(-8);
|
|
make.height.mas_equalTo(17);
|
|
make.top.equalTo(self.nextContentView).offset(0);
|
|
}];
|
|
|
|
UIView *moneyBgView = [[UIView alloc] init];
|
|
moneyBgView.backgroundColor = RGB16(0xC51A0C);
|
|
moneyBgView.layer.masksToBounds = YES;
|
|
moneyBgView.layer.cornerRadius = 8;
|
|
[self.nextContentView insertSubview:moneyBgView belowSubview:self.moneyLabel];
|
|
[moneyBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.bottom.right.equalTo(self.moneyLabel).offset(8);
|
|
make.left.equalTo(self.moneyLabel).offset(-8);
|
|
make.top.equalTo(self.moneyLabel).offset(-3);
|
|
}];
|
|
|
|
UIView *topBgView = [[UIView alloc] init];
|
|
topBgView.backgroundColor = RGB16(0xffffff);
|
|
topBgView.layer.masksToBounds = YES;
|
|
topBgView.layer.cornerRadius = 8;
|
|
[self.nextContentView addSubview:topBgView];
|
|
[topBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(moneyBgView.mas_bottom).offset(-8);
|
|
make.left.right.equalTo(self.nextContentView);
|
|
make.height.mas_equalTo(48);
|
|
}];
|
|
|
|
UILabel *moneyTitleLabel = [[UILabel alloc] init];
|
|
moneyTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
moneyTitleLabel.text = @"金额";
|
|
moneyTitleLabel.textColor = RGB16(0x666666);
|
|
moneyTitleLabel.textAlignment = NSTextAlignmentLeft;
|
|
[topBgView addSubview:moneyTitleLabel];
|
|
[moneyTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.centerY.equalTo(topBgView);
|
|
make.width.mas_equalTo(40);
|
|
}];
|
|
|
|
UILabel *moneyUnitLabel = [[UILabel alloc] init];
|
|
moneyUnitLabel.font = [UIFont systemFontOfSize:13];
|
|
moneyUnitLabel.textAlignment = NSTextAlignmentRight;
|
|
moneyUnitLabel.textColor = RGB16(0x666666);
|
|
self.moneyUnitLabel = moneyUnitLabel;
|
|
[topBgView addSubview:moneyUnitLabel];
|
|
[moneyUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.right.mas_equalTo(-15);
|
|
make.centerY.equalTo(topBgView);
|
|
make.width.mas_equalTo(30);
|
|
}];
|
|
|
|
|
|
UITextField *pwdTextField = [[UITextField alloc] init];
|
|
pwdTextField.font = [UIFont boldSystemFontOfSize:18];
|
|
pwdTextField.delegate = self;
|
|
pwdTextField.textColor = RGB16(0x666666);
|
|
pwdTextField.textAlignment = NSTextAlignmentRight;
|
|
pwdTextField.returnKeyType = UIReturnKeyDone;
|
|
pwdTextField.keyboardType = UIKeyboardTypeNumberPad;
|
|
pwdTextField.placeholder = @"请输入红包金额";
|
|
self.moneyTextField = pwdTextField;
|
|
[topBgView addSubview:pwdTextField];
|
|
[pwdTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(moneyTitleLabel.mas_right).offset(15);
|
|
make.right.equalTo(moneyUnitLabel.mas_left);
|
|
make.top.bottom.equalTo(topBgView);
|
|
}];
|
|
|
|
|
|
|
|
UIView *countBgView = [[UIView alloc] init];
|
|
countBgView.backgroundColor = RGB16(0xffffff);
|
|
countBgView.layer.masksToBounds = YES;
|
|
countBgView.layer.cornerRadius = 8;
|
|
[self.nextContentView addSubview:countBgView];
|
|
[countBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(topBgView.mas_bottom).offset(12);
|
|
make.left.right.equalTo(self.nextContentView);
|
|
make.height.mas_equalTo(48);
|
|
}];
|
|
|
|
UILabel *countTitleLabel = [[UILabel alloc] init];
|
|
countTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
countTitleLabel.text = @"个数";
|
|
countTitleLabel.textColor = RGB16(0x666666);
|
|
countTitleLabel.textAlignment = NSTextAlignmentLeft;
|
|
[countBgView addSubview:countTitleLabel];
|
|
[countTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.centerY.equalTo(countBgView);
|
|
make.width.mas_equalTo(40);
|
|
}];
|
|
|
|
UILabel *countUnitLabel = [[UILabel alloc] init];
|
|
countUnitLabel.font = [UIFont systemFontOfSize:13];
|
|
countUnitLabel.text = @"个";
|
|
countUnitLabel.textAlignment = NSTextAlignmentRight;
|
|
countUnitLabel.textColor = RGB16(0x666666);
|
|
[countBgView addSubview:countUnitLabel];
|
|
[countUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.right.mas_equalTo(-15);
|
|
make.centerY.equalTo(countBgView);
|
|
make.width.mas_equalTo(15);
|
|
}];
|
|
|
|
|
|
UITextField *countTextField = [[UITextField alloc] init];
|
|
countTextField.font = [UIFont boldSystemFontOfSize:18];
|
|
countTextField.delegate = self;
|
|
countTextField.textColor = RGB16(0x666666);
|
|
countTextField.textAlignment = NSTextAlignmentRight;
|
|
countTextField.returnKeyType = UIReturnKeyDone;
|
|
countTextField.placeholder = @"请输入红包数量";
|
|
countTextField.keyboardType = UIKeyboardTypeNumberPad;
|
|
self.countTextField = countTextField;
|
|
[countBgView addSubview:countTextField];
|
|
[countTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(countTitleLabel.mas_right).offset(15);
|
|
make.right.equalTo(countUnitLabel.mas_left);
|
|
make.top.bottom.equalTo(countBgView);
|
|
}];
|
|
|
|
UIView *drawAuthBgView = [[UIView alloc] init];
|
|
drawAuthBgView.backgroundColor = RGB16(0xffffff);
|
|
drawAuthBgView.layer.masksToBounds = YES;
|
|
drawAuthBgView.layer.cornerRadius = 8;
|
|
[self.nextContentView addSubview:drawAuthBgView];
|
|
[drawAuthBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(countBgView.mas_bottom).offset(12);
|
|
make.left.right.equalTo(self.nextContentView);
|
|
make.height.mas_equalTo(88);
|
|
}];
|
|
|
|
UILabel *authTitleLabel = [[UILabel alloc] init];
|
|
authTitleLabel.textColor = RGB16(0x666666);
|
|
authTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
authTitleLabel.text = @"条件";
|
|
[drawAuthBgView addSubview:authTitleLabel];
|
|
[authTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.top.mas_equalTo(11);
|
|
make.height.mas_equalTo(26);
|
|
}];
|
|
|
|
CGFloat btnWidth = 88.3;
|
|
CGFloat leftMargin = 15;
|
|
CGFloat btnSpace = 10;
|
|
CGFloat btnHeight = 36;
|
|
for (int i = 0; i < self.drawAuthArray.count ; i++) {
|
|
UIButton *btn = [[UIButton alloc] init];
|
|
NSNumber *number = self.drawAuthArray[i];
|
|
NSString *title = @"";
|
|
if (number.intValue == 0) {
|
|
self.noDrawAuthBtn = btn;
|
|
title = @"无";
|
|
}else if(number.intValue == 1){
|
|
self.collectDrawAuthBtn = btn;
|
|
title = @"收藏房间";
|
|
}else if(number.intValue == 2){
|
|
self.upSeatDrawAuthBtn = btn;
|
|
title = @"仅麦上用户";
|
|
}
|
|
[btn setTitle:title forState:(UIControlStateNormal)];
|
|
[btn setBackgroundImage:[UIImage imageNamed:@"red_bag_auth_btn_bg_nor"] forState:(UIControlStateNormal)];
|
|
[btn setBackgroundImage:[UIImage imageNamed:@"red_bag_auth_btn_bg_sel"] forState:(UIControlStateSelected)];
|
|
btn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
|
|
[btn addTarget:self action:@selector(drawAuthAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
|
[drawAuthBgView addSubview:btn];
|
|
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(leftMargin+(btnWidth+btnSpace)*i);
|
|
make.width.mas_equalTo(btnWidth);
|
|
make.height.mas_equalTo(btnHeight);
|
|
make.bottom.mas_equalTo(-5);
|
|
}];
|
|
// 首次选中立刻
|
|
if (i == 0) {
|
|
btn.selected = YES;
|
|
}
|
|
}
|
|
|
|
UIView *remarkBgView = [[UIView alloc] init];
|
|
remarkBgView.backgroundColor = RGB16(0xffffff);
|
|
remarkBgView.layer.masksToBounds = YES;
|
|
remarkBgView.layer.cornerRadius = 8;
|
|
[self.nextContentView addSubview:remarkBgView];
|
|
[remarkBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(drawAuthBgView.mas_bottom).offset(12);
|
|
make.left.right.equalTo(self.nextContentView);
|
|
make.height.mas_equalTo(48);
|
|
}];
|
|
|
|
UILabel *remarkTitleLabel = [[UILabel alloc] init];
|
|
remarkTitleLabel.font = [UIFont boldSystemFontOfSize:18];
|
|
remarkTitleLabel.text = @"备注";
|
|
remarkTitleLabel.textColor = RGB16(0x666666);
|
|
[remarkBgView addSubview:remarkTitleLabel];
|
|
[remarkTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.mas_equalTo(15);
|
|
make.centerY.equalTo(remarkBgView);
|
|
make.width.mas_equalTo(40);
|
|
}];
|
|
|
|
UITextField *remarkTextField = [[UITextField alloc] init];
|
|
remarkTextField.font = [UIFont boldSystemFontOfSize:18];
|
|
remarkTextField.delegate = self;
|
|
remarkTextField.textColor = RGB16(0x666666);
|
|
remarkTextField.textAlignment = NSTextAlignmentRight;
|
|
remarkTextField.returnKeyType = UIReturnKeyDone;
|
|
remarkTextField.placeholder = @"请输入备注";
|
|
self.remarkTextField = remarkTextField;
|
|
[remarkBgView addSubview:remarkTextField];
|
|
[remarkTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(remarkTitleLabel.mas_right).offset(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.top.bottom.equalTo(remarkBgView);
|
|
}];
|
|
}
|
|
|
|
|
|
-(void)initRuleView{
|
|
self.ruleContentView = [[UIView alloc] init];
|
|
self.ruleContentView.hidden = YES;
|
|
self.ruleContentView.backgroundColor = RGB16(0xffffff);
|
|
self.ruleContentView.layer.masksToBounds = YES;
|
|
self.ruleContentView.layer.cornerRadius = 16;
|
|
[self.bgView addSubview:self.ruleContentView];
|
|
[self.ruleContentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(self.titleLabel.mas_bottom).offset(15);
|
|
make.left.mas_equalTo(15);
|
|
make.right.mas_equalTo(-15);
|
|
make.bottom.equalTo(self.bgView).offset(-15);
|
|
}];
|
|
|
|
self.webView = [[WKWebView alloc] init];
|
|
[self.ruleContentView addSubview:self.webView];
|
|
[self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.top.mas_equalTo(15);
|
|
make.right.bottom.mas_equalTo(-15);
|
|
}];
|
|
}
|
|
#pragma mark - UITextFieldDelegate
|
|
-(void)textFieldDidBeginEditing:(UITextField *)textField{
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.bgView.y = 0;
|
|
}];
|
|
|
|
}
|
|
-(void)textFieldDidEndEditing:(UITextField *)textField{
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.bgView.y = (SCREEN_HEIGHT-454)/2;
|
|
}];
|
|
}
|
|
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
|
|
[textField resignFirstResponder];
|
|
return YES;
|
|
}
|
|
|
|
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
|
|
[self endEditing:YES];
|
|
}
|
|
|
|
#pragma mark - action
|
|
-(void)nextAction{
|
|
if (self.redBagType.intValue == 2) {
|
|
if (![self.pwdTextField.text isExist]) {
|
|
showToast(@"请输入口令");
|
|
return;
|
|
}
|
|
}
|
|
self.currentPage = 1;
|
|
if (self.redBagContentType.intValue == 1) {
|
|
self.moneyUnitLabel.text = @"金币";
|
|
}else{
|
|
self.moneyUnitLabel.text = @"钻石";
|
|
}
|
|
self.backBtn.hidden = YES;
|
|
self.helpBtn.hidden = NO;
|
|
|
|
self.nextBtn.hidden = YES;
|
|
self.commitBtn.hidden = NO;
|
|
|
|
self.nextContentView.alpha = 0;
|
|
self.nextContentView.hidden = NO;
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.firstContentView.alpha = 0;
|
|
self.nextContentView.alpha = 1;
|
|
} completion:^(BOOL finished) {
|
|
self.firstContentView.hidden = YES;
|
|
self.firstContentView.alpha = 1;
|
|
}];
|
|
}
|
|
-(void)commitAction{
|
|
if (![self.moneyTextField.text isExist]) {
|
|
showToast(@"请输入红包金额");
|
|
return;
|
|
}
|
|
if (![self.countTextField.text isExist]) {
|
|
showToast(@"请输入红包数量");
|
|
return;
|
|
}
|
|
if (self.countTextField.text.longLongValue > self.moneyTextField.text.longLongValue) {
|
|
showToast(@"红包数量不能大于红包金额");
|
|
return;
|
|
}
|
|
if (self.isSendNet) {
|
|
return;
|
|
}
|
|
self.isSendNet = YES;
|
|
[QXMineNetwork createRedpacketWithType:self.redBagType
|
|
password:self.pwdTextField.text
|
|
coin_type:self.redBagContentType
|
|
total_amount:self.moneyTextField.text
|
|
total_count:self.countTextField.text
|
|
conditions:self.conditions
|
|
countdown:self.redBagTime
|
|
room_id:self.room_id
|
|
remark:self.remarkTextField.text
|
|
successBlock:^(NSDictionary * _Nonnull dict) {
|
|
self.isSendNet = NO;
|
|
showToast(@"发送成功");
|
|
[self hide];
|
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
|
self.isSendNet = NO;
|
|
showToast(msg);
|
|
}];
|
|
}
|
|
|
|
-(void)helpAction{
|
|
self.isFromRule = YES;
|
|
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.baidu.com"]];
|
|
[self.webView loadRequest:request];
|
|
self.backBtn.hidden = NO;
|
|
self.helpBtn.hidden = YES;
|
|
|
|
self.nextBtn.hidden = YES;
|
|
self.commitBtn.hidden = YES;
|
|
|
|
self.ruleContentView.alpha = 0;
|
|
self.ruleContentView.hidden = NO;
|
|
|
|
UIView *currentView = self.currentPage==1?self.nextContentView:self.firstContentView;
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
currentView.alpha = 0;
|
|
self.ruleContentView.alpha = 1;
|
|
} completion:^(BOOL finished) {
|
|
currentView.hidden = YES;
|
|
currentView.alpha = 1;
|
|
}];
|
|
}
|
|
-(void)closeAction{
|
|
[self hide];
|
|
}
|
|
-(void)backAction{
|
|
self.backBtn.hidden = YES;
|
|
self.helpBtn.hidden = NO;
|
|
UIView *currentView = self.currentPage==1?self.nextContentView:self.firstContentView;
|
|
|
|
self.nextBtn.hidden = self.currentPage==0?NO:YES;
|
|
self.commitBtn.hidden = self.currentPage==1?NO:YES;
|
|
currentView.alpha = 0;
|
|
currentView.hidden = NO;
|
|
[UIView animateWithDuration:0.3 animations:^{
|
|
self.ruleContentView.alpha = 0;
|
|
currentView.alpha = 1;
|
|
} completion:^(BOOL finished) {
|
|
self.ruleContentView.alpha = 1;
|
|
self.ruleContentView.hidden = YES;
|
|
}];
|
|
self.isFromRule = NO;
|
|
}
|
|
-(void)selectedRedBagTypeAction:(UIButton*)sender{
|
|
if (sender.selected) {
|
|
return;
|
|
}
|
|
if (sender == self.normalRedBagBtn) {
|
|
self.pwdRedBagBtn.selected = NO;
|
|
self.normalRedBagBtn.selected = YES;
|
|
self.firstPwdView.hidden = YES;
|
|
[self.firstTimeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(self.firstTopView.mas_bottom).offset(12);
|
|
}];
|
|
self.redBagType = @"1";
|
|
self.pwdTextField.text = @"";
|
|
}else{
|
|
self.pwdRedBagBtn.selected = YES;
|
|
self.normalRedBagBtn.selected = NO;
|
|
self.firstPwdView.hidden = NO;
|
|
[self.firstTimeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
|
make.top.equalTo(self.firstTopView.mas_bottom).offset(72);
|
|
}];
|
|
self.redBagType = @"2";
|
|
}
|
|
}
|
|
|
|
-(void)redBagContentTypeAction:(UIButton*)sender{
|
|
if (sender.selected) {
|
|
return;
|
|
}
|
|
if (sender == self.coinRedBagBtn) {
|
|
self.diamondRedBagBtn.selected = NO;
|
|
[self.scrollBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.mas_equalTo(66);
|
|
make.left.top.bottom.mas_equalTo(0);
|
|
}];
|
|
self.coinRedBagBtn.selected = YES;
|
|
self.redBagContentType = @"1";
|
|
self.moneyLabel.text = [NSString stringWithFormat:@"%@金币可用",self.coin];
|
|
}else{
|
|
self.coinRedBagBtn.selected = NO;
|
|
[self.scrollBgView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
make.width.mas_equalTo(66);
|
|
make.right.top.bottom.mas_equalTo(0);
|
|
}];
|
|
self.diamondRedBagBtn.selected = YES;
|
|
self.redBagContentType = @"2";
|
|
self.moneyLabel.text = [NSString stringWithFormat:@"%@钻石可用",self.earnings];
|
|
}
|
|
}
|
|
-(void)drawAuthAction:(UIButton*)sender{
|
|
if (sender == self.noDrawAuthBtn) {
|
|
self.noDrawAuthBtn.selected = YES;
|
|
self.collectDrawAuthBtn.selected = NO;
|
|
self.upSeatDrawAuthBtn.selected = NO;
|
|
}else if (sender == self.collectDrawAuthBtn) {
|
|
self.collectDrawAuthBtn.selected = !self.collectDrawAuthBtn.selected;
|
|
if (self.upSeatDrawAuthBtn.selected || self.collectDrawAuthBtn.selected) {
|
|
self.noDrawAuthBtn.selected = NO;
|
|
}else{
|
|
self.noDrawAuthBtn.selected = YES;
|
|
}
|
|
}else if (sender == self.upSeatDrawAuthBtn) {
|
|
self.noDrawAuthBtn.selected = NO;
|
|
self.upSeatDrawAuthBtn.selected = !self.upSeatDrawAuthBtn.selected;
|
|
if (self.upSeatDrawAuthBtn.selected || self.collectDrawAuthBtn.selected) {
|
|
self.noDrawAuthBtn.selected = NO;
|
|
}else{
|
|
self.noDrawAuthBtn.selected = YES;
|
|
}
|
|
}
|
|
|
|
if (self.collectDrawAuthBtn.selected && self.upSeatDrawAuthBtn.selected) {
|
|
self.conditions = @"1,2";
|
|
}else{
|
|
if (self.collectDrawAuthBtn.selected) {
|
|
self.conditions = @"1";
|
|
}else if (self.upSeatDrawAuthBtn.selected) {
|
|
self.conditions = @"2";
|
|
}else{
|
|
self.conditions = @"0";
|
|
}
|
|
}
|
|
}
|
|
-(void)redBagTimeAction:(UIButton*)sender{
|
|
if (sender.selected == YES) {
|
|
return;
|
|
}
|
|
self.selectedRedBagTimeBtn.selected = NO;
|
|
sender.selected = YES;
|
|
self.selectedRedBagTimeBtn = sender;
|
|
self.redBagTime = [NSString stringWithFormat:@"%ld",(sender.tag-10)*60];
|
|
}
|
|
|
|
|
|
-(void)showInView:(UIView *)view{
|
|
self.bgView.y = -SCREEN_HEIGHT;
|
|
[view addSubview:self];
|
|
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
|
self.bgView.y = (SCREEN_HEIGHT-454)/2;
|
|
} completion:^(BOOL finished) {
|
|
|
|
}];
|
|
}
|
|
|
|
-(void)hide{
|
|
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
|
self.bgView.y = SCREEN_HEIGHT;
|
|
} completion:^(BOOL finished) {
|
|
[self removeFromSuperview];
|
|
}];
|
|
}
|
|
@end
|