提交
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXRoomModel.h"
|
||||
#import "NoitceAndKey.h"
|
||||
#import "QXRedPacketModel.h"
|
||||
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
/// 静音
|
||||
@@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
-(void)didClickEventType:(QXRoomBottomViewEventType)type isSelected:(BOOL)isSelected;
|
||||
|
||||
-(void)didSendMessage:(NSString*)message redpacketModel:(QXRedPacketModel*)redpacketModel;
|
||||
@end
|
||||
|
||||
@interface QXRoomBottomView : UIView
|
||||
@@ -48,6 +50,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign)BOOL isCabinRoom;
|
||||
|
||||
-(void)atUserWithName:(NSString*)nickname;
|
||||
|
||||
-(void)inputMessageWithName:(NSString*)message redpacketModel:(QXRedPacketModel*)redpacketModel;
|
||||
/// 是否静音 1 不静音 0 静音
|
||||
-(void)setPlayAudioStatus:(BOOL)status;
|
||||
/// 是否闭麦 0 未闭麦 1 已闭麦
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
@property (nonatomic,assign)QXRoomRoleType roleType;
|
||||
@property (nonatomic,strong)QXDynamicCommentInputView *commentView;
|
||||
|
||||
@property (nonatomic,assign)QXRedPacketModel* redpacketModel;
|
||||
@end
|
||||
|
||||
@implementation QXRoomBottomView
|
||||
@@ -346,6 +348,12 @@
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
-(void)inputMessageWithName:(NSString *)message redpacketModel:(QXRedPacketModel*)redpacketModel{
|
||||
self.redpacketModel = redpacketModel;
|
||||
self.commentView.textField.text = [NSString stringWithFormat:@"%@",message];
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
#pragma mark - 发消息
|
||||
-(void)didClickSendWithText:(NSString*)text model:(nonnull QXDynamicCommentListModel *)model{
|
||||
if (self.roomModel.user_info.is_mute.intValue == 1) {
|
||||
@@ -357,7 +365,13 @@
|
||||
[[QXRoomMessageManager shared] sendChatMessage:text messageType:(QXRoomMessageTypeText) needInsertMessage:YES];
|
||||
self.commentView.textField.text = @"";
|
||||
[self.vc.view endEditing:YES];
|
||||
|
||||
if (self.redpacketModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didSendMessage:redpacketModel:)]) {
|
||||
[self.delegate didSendMessage:text redpacketModel:self.redpacketModel];
|
||||
}
|
||||
self.redpacketModel = nil;
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification {
|
||||
|
||||
@@ -185,15 +185,15 @@ NSInteger maxMessageCount = 20;
|
||||
if (model.messageType == QXRoomChatMessageTypeGift) {
|
||||
[self.giftArray addObject:model];
|
||||
}
|
||||
if (self.dataArray.count>maxMessageCount) {
|
||||
[self.dataArray removeFirstObject];
|
||||
}
|
||||
if (self.chatArray.count>maxMessageCount) {
|
||||
[self.chatArray removeFirstObject];
|
||||
}
|
||||
if (self.giftArray.count>maxMessageCount) {
|
||||
[self.giftArray removeFirstObject];
|
||||
}
|
||||
// if (self.dataArray.count>maxMessageCount) {
|
||||
// [self.dataArray removeFirstObject];
|
||||
// }
|
||||
// if (self.chatArray.count>maxMessageCount) {
|
||||
// [self.chatArray removeFirstObject];
|
||||
// }
|
||||
// if (self.giftArray.count>maxMessageCount) {
|
||||
// [self.giftArray removeFirstObject];
|
||||
// }
|
||||
[self.tableView reloadData];
|
||||
if (self.isDragging) {
|
||||
self.messageCount++;
|
||||
|
||||
48
QXLive/HomePage(声播)/View/房间/红包/QXRedBagDrawView.h
Normal file
48
QXLive/HomePage(声播)/View/房间/红包/QXRedBagDrawView.h
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// QXRedBagDrawView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXRedPacketModel.h"
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
/// 打开红包
|
||||
QXRedBagDrawTypeOpen = 0,
|
||||
/// 倒计时
|
||||
QXRedBagDrawTypeTimeDown,
|
||||
/// 收藏房间
|
||||
QXRedBagDrawTypeCollect,
|
||||
/// 手慢了被领完了
|
||||
QXRedBagDrawTypeFinished,
|
||||
/// 口令红包发送评论
|
||||
QXRedBagDrawTypePwdSend,
|
||||
/// 口令红包倒计时
|
||||
QXRedBagDrawTypePwdTimeDown,
|
||||
/// 口令红包收藏房间
|
||||
QXRedBagDrawTypePwdCollect,
|
||||
/// 需要完成两个任务
|
||||
QXRedBagDrawTypePwdAllTask,
|
||||
}QXRedBagDrawType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedBagDrawView : UIView
|
||||
@property (nonatomic,strong)QXRedPacketModel *redpacketModel;
|
||||
@property (nonatomic,assign)QXRedBagDrawType type;
|
||||
@property (nonatomic,copy)void(^toInputPwdBlock)(NSString *password,QXRedPacketModel*redpacketModel);
|
||||
-(void)showInView:(UIView*)view;
|
||||
-(void)hide;
|
||||
@end
|
||||
|
||||
|
||||
@interface QXRedBagTimeDownView : UIView
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)UILabel *timeLabel;
|
||||
@property (nonatomic,strong)UIButton *btn;
|
||||
@property (nonatomic,assign)QXRedBagDrawType type;
|
||||
@property (nonatomic,assign)int time;
|
||||
@property (nonatomic,copy)void(^btnBlcok)(QXRedBagDrawType type);
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
437
QXLive/HomePage(声播)/View/房间/红包/QXRedBagDrawView.m
Normal file
437
QXLive/HomePage(声播)/View/房间/红包/QXRedBagDrawView.m
Normal file
@@ -0,0 +1,437 @@
|
||||
//
|
||||
// QXRedBagDrawView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import "QXRedBagDrawView.h"
|
||||
#import "QXRedBagRecordViewController.h"
|
||||
@class QXRedBagTimeDownView;
|
||||
@interface QXRedBagDrawView()
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)UIImageView *userHeaderImageView;
|
||||
@property (nonatomic,strong)UILabel *userNameLabel;
|
||||
@property (nonatomic,strong)UILabel *remarkLabel;
|
||||
@property (nonatomic,strong)UIButton *closeBtn;
|
||||
|
||||
/// 开红包
|
||||
@property (nonatomic,strong)UIButton *openBtn;
|
||||
/// 查看大家手气
|
||||
@property (nonatomic,strong)UIButton *recordBtn;
|
||||
/// 倒计时
|
||||
@property (nonatomic,strong)QXRedBagTimeDownView *timeDownView;
|
||||
/// 参与条件
|
||||
@property (nonatomic,strong)UIView *pwdBgView;
|
||||
@property (nonatomic,strong)UILabel *drawTitleLabel;
|
||||
@property (nonatomic,strong)UILabel *commentTitleLabel;
|
||||
@property (nonatomic,strong)UILabel *pwdTitleLable;
|
||||
/// 抢红包必须在本房间内
|
||||
@property (nonatomic,strong)UILabel *bottomLabel;
|
||||
@end
|
||||
@implementation QXRedBagDrawView
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
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_draw_redbag_bg"];
|
||||
[self.bgView addSubview:self.bgImageView];
|
||||
|
||||
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.right.mas_equalTo(-5);
|
||||
make.top.mas_equalTo(15);
|
||||
}];
|
||||
|
||||
self.userHeaderImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.userHeaderImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.userHeaderImageView addRoundedCornersWithRadius:39.5];
|
||||
[self.bgView addSubview:self.userHeaderImageView];
|
||||
[self.userHeaderImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.top.mas_equalTo(73);
|
||||
make.width.height.mas_equalTo(79);
|
||||
}];
|
||||
|
||||
self.userNameLabel = [[UILabel alloc] init];
|
||||
self.userNameLabel.text = @"傻狗涛";
|
||||
self.userNameLabel.textColor = RGB16(0xffffff);
|
||||
self.userNameLabel.font = [UIFont boldSystemFontOfSize:18];
|
||||
self.userNameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[self.bgView addSubview:self.userNameLabel];
|
||||
[self.userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.height.mas_equalTo(26);
|
||||
make.top.equalTo(self.userHeaderImageView.mas_bottom).offset(27);
|
||||
}];
|
||||
|
||||
self.remarkLabel = [[UILabel alloc] init];
|
||||
self.remarkLabel.textColor = RGB16(0xffffff);
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.remarkLabel.font = [UIFont boldSystemFontOfSize:24];
|
||||
self.remarkLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[self.bgView addSubview:self.remarkLabel];
|
||||
[self.remarkLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.height.mas_equalTo(26);
|
||||
make.top.equalTo(self.userNameLabel.mas_bottom).offset(2);
|
||||
}];
|
||||
|
||||
self.openBtn = [[UIButton alloc] init];
|
||||
[self.openBtn setImage:[UIImage imageNamed:@"draw_redbag_btn"] forState:(UIControlStateNormal)];
|
||||
[self.openBtn addTarget:self action:@selector(openAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bgView addSubview:self.openBtn];
|
||||
[self.openBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.remarkLabel.mas_bottom).offset(19);
|
||||
make.width.height.mas_equalTo(126);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
}];
|
||||
|
||||
self.recordBtn = [[UIButton alloc] init];
|
||||
[self.recordBtn setTitle:@"查看大家手气 >" forState:(UIControlStateNormal)];
|
||||
[self.recordBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
self.recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[self.recordBtn addTarget:self action:@selector(recordAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bgView addSubview:self.recordBtn];
|
||||
[self.recordBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.bottom.mas_equalTo(-63);
|
||||
make.height.mas_equalTo(26);
|
||||
}];
|
||||
|
||||
self.timeDownView = [[QXRedBagTimeDownView alloc] init];
|
||||
self.timeDownView.hidden = YES;
|
||||
@weakify(self)
|
||||
self.timeDownView.btnBlcok = ^(QXRedBagDrawType type) {
|
||||
@strongify(self);
|
||||
if (type == QXRedBagDrawTypePwdCollect) {
|
||||
/// 这里去收藏房间
|
||||
[self setType:(QXRedBagDrawTypeOpen)];
|
||||
return;
|
||||
}
|
||||
if (self.toInputPwdBlock) {
|
||||
self.toInputPwdBlock(@"傻狗涛来了,大家都让一让",self.redpacketModel);
|
||||
}
|
||||
[self hide];
|
||||
};
|
||||
[self.bgView addSubview:self.timeDownView];
|
||||
[self.timeDownView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(220);
|
||||
make.height.mas_equalTo(93);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.top.equalTo(self.remarkLabel.mas_bottom).offset(30);
|
||||
}];
|
||||
|
||||
self.bottomLabel = [[UILabel alloc] init];
|
||||
self.bottomLabel.text = @"抢红包必须在本房间内";
|
||||
self.bottomLabel.hidden = YES;
|
||||
self.bottomLabel.textColor = RGB16(0xffffff);
|
||||
self.bottomLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.bgView addSubview:self.bottomLabel];
|
||||
[self.bottomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(26);
|
||||
make.bottom.mas_equalTo(-15);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
}];
|
||||
|
||||
self.pwdBgView = [[UIView alloc] init];
|
||||
[self.bgView addSubview:self.pwdBgView];
|
||||
[self.pwdBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.bottomLabel.mas_top);
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
make.height.mas_equalTo(72);
|
||||
}];
|
||||
|
||||
self.drawTitleLabel = [[UILabel alloc] init];
|
||||
self.drawTitleLabel.text = @"口令红包参与条件";
|
||||
self.drawTitleLabel.textColor = RGB16(0xffffff);
|
||||
self.drawTitleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.drawTitleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.pwdBgView addSubview:self.drawTitleLabel];
|
||||
[self.drawTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.pwdBgView);
|
||||
make.height.mas_equalTo(20);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
}];
|
||||
|
||||
self.commentTitleLabel = [[UILabel alloc] init];
|
||||
self.commentTitleLabel.text = @"发送评论:这是一个口令";
|
||||
self.commentTitleLabel.textColor = RGB16(0xFFCE47);
|
||||
self.commentTitleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.commentTitleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.pwdBgView addSubview:self.commentTitleLabel];
|
||||
[self.commentTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.drawTitleLabel.mas_bottom).offset(3);
|
||||
make.height.mas_equalTo(20);
|
||||
make.centerX.equalTo(self.bgView);;
|
||||
}];
|
||||
|
||||
self.pwdTitleLable = [[UILabel alloc] init];
|
||||
self.pwdTitleLable.text = @"收藏房间";
|
||||
self.pwdTitleLable.textColor = RGB16(0xFFCE47);
|
||||
self.pwdTitleLable.textAlignment = NSTextAlignmentCenter;
|
||||
self.pwdTitleLable.font = [UIFont systemFontOfSize:14];
|
||||
[self.pwdBgView addSubview:self.pwdTitleLable];
|
||||
[self.pwdTitleLable mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.commentTitleLabel.mas_bottom).offset(3);
|
||||
make.height.mas_equalTo(20);
|
||||
make.centerX.equalTo(self.bgView);;
|
||||
}];
|
||||
}
|
||||
/**
|
||||
/// 打开红包
|
||||
QXRedBagDrawTypeOpen = 0,
|
||||
/// 倒计时
|
||||
QXRedBagDrawTypeTimeDown,
|
||||
/// 收藏房间
|
||||
QXRedBagDrawTypeCollect,
|
||||
/// 手慢了被领完了
|
||||
QXRedBagDrawTypeFinished,
|
||||
/// 口令红包发送评论
|
||||
QXRedBagDrawTypePwdSend,
|
||||
/// 口令红包倒计时
|
||||
QXRedBagDrawTypePwdTimeDown,
|
||||
/// 口令红包收藏房间
|
||||
QXRedBagDrawTypePwdCollect,
|
||||
*/
|
||||
|
||||
-(void)setType:(QXRedBagDrawType)type{
|
||||
_type = type;
|
||||
switch (type) {
|
||||
case QXRedBagDrawTypeOpen:{
|
||||
self.openBtn.hidden = NO;
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.recordBtn.hidden = YES;
|
||||
self.timeDownView.hidden = YES;
|
||||
self.bottomLabel.hidden = YES;
|
||||
self.pwdBgView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypeFinished:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"手慢了,红包被领完了";
|
||||
self.recordBtn.hidden = NO;
|
||||
self.timeDownView.hidden = YES;
|
||||
self.bottomLabel.hidden = YES;
|
||||
self.pwdBgView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypeCollect:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.recordBtn.hidden = YES;
|
||||
self.timeDownView.type = QXRedBagDrawTypeCollect;
|
||||
self.timeDownView.hidden = NO;
|
||||
self.bottomLabel.hidden = NO;
|
||||
self.pwdBgView.hidden = YES;
|
||||
[self performSelector:@selector(changeType) afterDelay:2];
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypeTimeDown:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.recordBtn.hidden = YES;
|
||||
self.timeDownView.type = QXRedBagDrawTypeTimeDown;
|
||||
self.timeDownView.hidden = NO;
|
||||
self.bottomLabel.hidden = NO;
|
||||
self.pwdBgView.hidden = YES;
|
||||
[self performSelector:@selector(changeType) afterDelay:2];
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdSend:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.recordBtn.hidden = YES;
|
||||
self.timeDownView.type = QXRedBagDrawTypePwdSend;
|
||||
self.timeDownView.hidden = NO;
|
||||
self.pwdBgView.hidden = NO;
|
||||
self.pwdTitleLable.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdTimeDown:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"恭喜发财,大吉大利";
|
||||
self.recordBtn.hidden = YES;
|
||||
self.timeDownView.type = QXRedBagDrawTypePwdTimeDown;
|
||||
self.timeDownView.hidden = NO;
|
||||
self.bottomLabel.hidden = NO;
|
||||
self.pwdBgView.hidden = YES;
|
||||
[self performSelector:@selector(changeType) afterDelay:2];
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdCollect:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"手慢了,红包被领完了";
|
||||
self.recordBtn.hidden = NO;
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdAllTask:{
|
||||
self.openBtn.hidden = YES;
|
||||
self.remarkLabel.text = @"手慢了,红包被领完了";
|
||||
self.recordBtn.hidden = NO;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
-(void)changeType{
|
||||
[self setType:QXRedBagDrawTypeOpen];
|
||||
}
|
||||
#pragma mark - action
|
||||
-(void)closeAction{
|
||||
[self hide];
|
||||
}
|
||||
|
||||
-(void)openAction{
|
||||
|
||||
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
//旋转角度
|
||||
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI];
|
||||
//每次旋转的时间(单位秒)
|
||||
rotationAnimation.duration = 0.5;
|
||||
rotationAnimation.cumulative = YES;
|
||||
rotationAnimation.removedOnCompletion = NO;
|
||||
//重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT
|
||||
rotationAnimation.repeatCount = MAXFLOAT;
|
||||
[self.openBtn.layer addAnimation:rotationAnimation forKey:@"openRedBagAnimate"];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.openBtn.layer removeAnimationForKey:@"openRedBagAnimate"];
|
||||
|
||||
BOOL isDrawed = NO;
|
||||
if (isDrawed) {
|
||||
QXRedBagRecordViewController *vc = [[QXRedBagRecordViewController alloc] init];
|
||||
vc.redbagId = @"";
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
[self hide];
|
||||
}else{
|
||||
[self setType:QXRedBagDrawTypeFinished];
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
-(void)recordAction{
|
||||
QXRedBagRecordViewController *vc = [[QXRedBagRecordViewController alloc] init];
|
||||
vc.redbagId = @"";
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
[self hide];
|
||||
}
|
||||
|
||||
-(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
|
||||
|
||||
|
||||
@implementation QXRedBagTimeDownView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setType:(QXRedBagDrawType)type{
|
||||
_type = type;
|
||||
switch (type) {
|
||||
case QXRedBagDrawTypeCollect:{
|
||||
self.timeLabel.text = @"收藏房间抢红包";
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypeTimeDown:
|
||||
case QXRedBagDrawTypePwdTimeDown:{
|
||||
self.timeLabel.text = @"00:00后开启红包";
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdSend:{
|
||||
self.timeLabel.text = @"发送评论抢红包";
|
||||
}
|
||||
break;
|
||||
|
||||
case QXRedBagDrawTypePwdCollect:{
|
||||
self.timeLabel.text = @"收藏房间抢红包";
|
||||
}
|
||||
break;
|
||||
case QXRedBagDrawTypePwdAllTask:{
|
||||
self.timeLabel.text = @"完成任务抢红包";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)btnClick{
|
||||
if (self.type == QXRedBagDrawTypePwdSend || self.type == QXRedBagDrawTypePwdCollect) {
|
||||
if (self.btnBlcok) {
|
||||
self.btnBlcok(self.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)setTime:(int)time{
|
||||
_time = time;
|
||||
|
||||
}
|
||||
|
||||
-(void)initSubViews{
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_bag_time_down_bg"]];
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] init];
|
||||
self.timeLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.timeLabel.font = [UIFont boldSystemFontOfSize:22];
|
||||
self.timeLabel.textColor = RGB16(0xffffff);
|
||||
[self addSubview:self.timeLabel];
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self);
|
||||
make.height.mas_equalTo(26);
|
||||
make.top.mas_equalTo(19);
|
||||
}];
|
||||
|
||||
self.btn = [[UIButton alloc] init];
|
||||
[self.btn addTarget:self action:@selector(btnClick) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.btn];
|
||||
[self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
23
QXLive/HomePage(声播)/View/房间/红包/QXRedBagListView.h
Normal file
23
QXLive/HomePage(声播)/View/房间/红包/QXRedBagListView.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// QXRedBagListView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedBagListView : UIView
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
-(void)showInView:(UIView *)view;
|
||||
-(void)hide;
|
||||
@property (nonatomic,copy)void(^didSelectedRedBlock)(void);
|
||||
@end
|
||||
|
||||
@interface QXRedBagListCell : UICollectionViewCell
|
||||
@property (nonatomic,strong)UIImageView *redBagImageView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
164
QXLive/HomePage(声播)/View/房间/红包/QXRedBagListView.m
Normal file
164
QXLive/HomePage(声播)/View/房间/红包/QXRedBagListView.m
Normal file
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// QXRedBagListView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import "QXRedBagListView.h"
|
||||
@interface QXRedBagListView()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
@property (nonatomic,strong)UIView *bigBgView;
|
||||
@property (nonatomic,strong)UIImageView *bigBgImageView;
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)UIImageView *bottomImageView;
|
||||
@property (nonatomic,strong)UIButton *closeBtn;
|
||||
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@end
|
||||
@implementation QXRedBagListView
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.bigBgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-375)/2, (SCREEN_HEIGHT-480)/2, 375, 480)];
|
||||
[self addSubview:self.bigBgView];
|
||||
|
||||
self.bigBgImageView = [[UIImageView alloc] initWithFrame:self.bigBgView.bounds];
|
||||
self.bigBgImageView.image = [UIImage imageNamed:@"red_bag_list_big_bg"];
|
||||
[self.bigBgView addSubview:self.bigBgImageView];
|
||||
|
||||
self.bgView = [[UIView alloc] init];
|
||||
[self.bgView addRoundedCornersWithRadius:10];
|
||||
[self.bigBgView addSubview:self.bgView];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(280);
|
||||
make.height.mas_equalTo(252);
|
||||
make.centerX.equalTo(self.bigBgView);
|
||||
make.top.mas_equalTo(60);
|
||||
}];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bgView.width, 242)];
|
||||
self.bgImageView.image = [UIImage imageNamed:@"red_bag_list_bg"];
|
||||
[self.bgView addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.equalTo(self.bgView);
|
||||
make.height.mas_equalTo(242);
|
||||
}];
|
||||
self.bottomImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_bag_list_bottom_bg"]];
|
||||
self.bottomImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self.bgView addSubview:self.bottomImageView];
|
||||
[self.bottomImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.bottom.right.equalTo(self.bgView);
|
||||
make.top.equalTo(self.bgImageView.mas_bottom).offset(-1);
|
||||
}];
|
||||
|
||||
self.closeBtn = [[UIButton alloc] init];
|
||||
[self.closeBtn setBackgroundImage:[UIImage imageNamed:@"home_white_close"] forState:(UIControlStateNormal)];
|
||||
[self.closeBtn addTarget:self action:@selector(closeAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bigBgView addSubview:self.closeBtn];
|
||||
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self);
|
||||
make.top.equalTo(self.bgView.mas_bottom).offset(40);
|
||||
make.height.width.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(66,66);
|
||||
layout.minimumLineSpacing =20;
|
||||
layout.minimumInteritemSpacing =16;
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
[self.collectionView registerClass:[QXRedBagListCell class] forCellWithReuseIdentifier:@"QXRedBagListCell"];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
self.collectionView.showsHorizontalScrollIndicator = NO;
|
||||
self.collectionView.showsVerticalScrollIndicator = NO;
|
||||
self.collectionView.bounces = NO;
|
||||
self.collectionView.backgroundColor = [UIColor clearColor];
|
||||
[self.bgView addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(25);
|
||||
make.right.mas_equalTo(-25);
|
||||
make.bottom.mas_equalTo(-30);
|
||||
make.top.mas_equalTo(156);
|
||||
}];
|
||||
}
|
||||
-(void)setDataArray:(NSMutableArray *)dataArray{
|
||||
_dataArray = dataArray;
|
||||
if (dataArray.count >3) {
|
||||
[self.bgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(338);
|
||||
}];
|
||||
}else{
|
||||
[self.bgView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(252);
|
||||
}];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXRedBagListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXRedBagListCell" forIndexPath:indexPath];
|
||||
return cell;
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.didSelectedRedBlock) {
|
||||
self.didSelectedRedBlock();
|
||||
}
|
||||
[self hide];
|
||||
}
|
||||
-(void)closeAction{
|
||||
[self hide];
|
||||
}
|
||||
-(void)showInView:(UIView *)view{
|
||||
self.bigBgView.y = -SCREEN_HEIGHT;
|
||||
[view addSubview:self];
|
||||
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
self.bigBgView.y = (SCREEN_HEIGHT-480)/2;
|
||||
} completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)hide{
|
||||
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
self.bigBgView.y = SCREEN_HEIGHT;
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXRedBagListCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.redBagImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_bag_list_icon"]];
|
||||
[self.contentView addSubview:self.redBagImageView];
|
||||
[self.redBagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
17
QXLive/HomePage(声播)/View/房间/红包/QXRedBagSendView.h
Normal file
17
QXLive/HomePage(声播)/View/房间/红包/QXRedBagSendView.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// QXRedBagSendView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/10.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedBagSendView : UIView
|
||||
-(void)showInView:(UIView*)view;
|
||||
-(void)hide;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
847
QXLive/HomePage(声播)/View/房间/红包/QXRedBagSendView.m
Normal file
847
QXLive/HomePage(声播)/View/房间/红包/QXRedBagSendView.m
Normal file
@@ -0,0 +1,847 @@
|
||||
//
|
||||
// QXRedBagSendView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/10.
|
||||
//
|
||||
|
||||
#import "QXRedBagSendView.h"
|
||||
#import <WebKit/WebKit.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;
|
||||
|
||||
|
||||
|
||||
@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;
|
||||
@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.timeArray = @[@0,@1,@2,@5,@10];
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
|
||||
-(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.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 = @"请输入红包数量";
|
||||
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{
|
||||
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{
|
||||
|
||||
}
|
||||
|
||||
-(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";
|
||||
}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";
|
||||
}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";
|
||||
}
|
||||
}
|
||||
-(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
-(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
|
||||
17
QXLive/HomePage(声播)/View/房间/红包/QXRedBagTagView.h
Normal file
17
QXLive/HomePage(声播)/View/房间/红包/QXRedBagTagView.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// QXRedBagTagView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRedBagTagView : UIView
|
||||
@property (nonatomic,copy)void(^startBlock)(BOOL isList);
|
||||
@property (nonatomic,strong)NSString *count;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
79
QXLive/HomePage(声播)/View/房间/红包/QXRedBagTagView.m
Normal file
79
QXLive/HomePage(声播)/View/房间/红包/QXRedBagTagView.m
Normal file
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// QXRedBagTagView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/10/11.
|
||||
//
|
||||
|
||||
#import "QXRedBagTagView.h"
|
||||
|
||||
@interface QXRedBagTagView()
|
||||
@property (nonatomic,strong)UIImageView *imageView;
|
||||
@property (nonatomic,strong)UILabel *countLabel;
|
||||
@property (nonatomic,strong)UIButton *btn;
|
||||
@property (nonatomic,assign)CGFloat redTagHeight;
|
||||
@property (nonatomic,assign)CGFloat redTagWidth;
|
||||
@end
|
||||
@implementation QXRedBagTagView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.redTagHeight = ScaleWidth(80);
|
||||
self.redTagWidth = ScaleWidth(80);
|
||||
self.frame = CGRectMake(0, NavContentHeight+125, self.redTagHeight, self.redTagWidth);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
|
||||
|
||||
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"redbag_tag_icon"]];
|
||||
self.imageView.frame = CGRectMake(0, 0, self.redTagHeight, self.redTagWidth);
|
||||
[self addSubview:self.imageView];
|
||||
|
||||
self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, 20)];
|
||||
self.countLabel.textAlignment = NSTextAlignmentRight;
|
||||
self.countLabel.font = [UIFont boldSystemFontOfSize:14];
|
||||
self.countLabel.textColor = RGB16(0xFFFEB2);
|
||||
[self addSubview:self.countLabel];
|
||||
|
||||
self.btn = [[UIButton alloc] initWithFrame:self.bounds];
|
||||
[self.btn addTarget:self action:@selector(btnClick) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.btn];
|
||||
|
||||
UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
|
||||
[self addGestureRecognizer:panRecognizer];
|
||||
}
|
||||
-(void)btnClick{
|
||||
BOOL isList = self.count.intValue>0?YES:NO;
|
||||
if (self.startBlock) {
|
||||
self.startBlock(isList);
|
||||
}
|
||||
}
|
||||
-(void)setCount:(NSString *)count{
|
||||
_count = count;
|
||||
self.countLabel.text = [NSString stringWithFormat:@"x%@",count];
|
||||
}
|
||||
|
||||
-(void)handlePan:(UIPanGestureRecognizer*)recognizer{
|
||||
if (recognizer.state == UIGestureRecognizerStateEnded) {
|
||||
NSLog(@"拖动结束");
|
||||
}
|
||||
CGPoint translation = [recognizer translationInView:self.viewController.view];
|
||||
CGPoint panCenter = CGPointMake(recognizer.view.center.x + translation.x,
|
||||
recognizer.view.center.y + translation.y);
|
||||
if (panCenter.y < kSafeAreaTop || panCenter.y> SCREEN_HEIGHT-kSafeAreaBottom) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
recognizer.view.center = CGPointMake(self.redTagWidth/2,
|
||||
recognizer.view.center.y + translation.y);
|
||||
[recognizer setTranslation:CGPointZero inView:self.viewController.view];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -54,6 +54,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXRoomSettingTypeRoomReport = 26,
|
||||
/// 关闭飘屏
|
||||
QXRoomSettingTypeDrifPop = 27,
|
||||
/// 发红包
|
||||
QXRoomSettingTypeSendRedBag = 28,
|
||||
}QXRoomSettingType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class QXRoomSettingModel;
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomReport;
|
||||
/// 飘屏开关
|
||||
@property (nonatomic,strong)QXRoomSettingModel *drifPop;
|
||||
/// 发送红包
|
||||
@property (nonatomic,strong)QXRoomSettingModel *redBag;
|
||||
|
||||
|
||||
/// 主持列表
|
||||
@@ -176,7 +178,8 @@
|
||||
/// 暂时不需要房间补贴
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
}else{
|
||||
@@ -184,7 +187,8 @@
|
||||
/// 暂时不需要房间补贴
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
}
|
||||
@@ -196,7 +200,8 @@
|
||||
// 观众 更多操作 不区分麦上麦下
|
||||
roomTypeArr = @[];
|
||||
toolsArr = @[];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomEffects,self.drifPop,self.roomReport];
|
||||
self.titles = @[QXText(@"更多操作")];
|
||||
}
|
||||
break;
|
||||
@@ -218,7 +223,8 @@
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
}
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
@@ -244,7 +250,8 @@
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// moreArr = @[self.redBag,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
moreArr = @[self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
}
|
||||
break;
|
||||
@@ -574,6 +581,15 @@
|
||||
}
|
||||
return _drifPop;
|
||||
}
|
||||
-(QXRoomSettingModel *)redBag{
|
||||
if (!_redBag) {
|
||||
_redBag = [[QXRoomSettingModel alloc] init];
|
||||
_redBag.icon = @"room_set_room_send_redbag";
|
||||
_redBag.name = QXText(@"发红包");
|
||||
_redBag.type = QXRoomSettingTypeSendRedBag;
|
||||
}
|
||||
return _redBag;
|
||||
}
|
||||
-(QXDirectListView *)directView{
|
||||
if (!_directView) {
|
||||
_directView = [[QXDirectListView alloc] init];
|
||||
|
||||
Reference in New Issue
Block a user