diff --git a/Podfile b/Podfile index 88636c8..bd91b7b 100644 --- a/Podfile +++ b/Podfile @@ -20,6 +20,7 @@ def taget_pods pod 'MQTTClient' #菊花 pod 'MBProgressHUD' + pod 'SVProgressHUD' #图片选择 pod 'TZImagePickerController' # 布局 diff --git a/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.h b/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.h index bc83e9c..cf47f2f 100644 --- a/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.h +++ b/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.h @@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN -(void)didResignFirstResponder; +-(void)didBecomeFirstResponder; + @end @interface QXDynamicCommentInputView : UIView diff --git a/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.m b/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.m index 940b309..5adb5cf 100644 --- a/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.m +++ b/QXLive/Dynamic(语圈)/View/详情/QXDynamicCommentInputView.m @@ -9,6 +9,7 @@ @interface QXDynamicCommentInputView() @property (nonatomic,strong)UICollectionView *collectionViwew; +@property (nonatomic,strong)UIView *bigBgView; @property (nonatomic,strong)UIView *inputBgView; @property (nonatomic,strong)UIView *inputShadowView; @@ -62,7 +63,7 @@ self.textField = [[UITextField alloc] init]; self.textField.font = [UIFont systemFontOfSize:14]; self.textField.textColor = QXConfig.textColor; - self.textField.returnKeyType = UIReturnKeyDone; + self.textField.returnKeyType = UIReturnKeySend; self.textField.delegate = self; [self.textField addTarget:self action:@selector(textDidChange:) forControlEvents:UIControlEventEditingChanged]; [self.inputBgView addSubview:self.textField]; @@ -95,7 +96,14 @@ } } -(BOOL)textFieldShouldReturn:(UITextField *)textField{ + if (self.textField.text.length == 0) { + showToast(@"内容不能为空"); + return NO; + } [textField resignFirstResponder]; + if (self.delegate && [self.delegate respondsToSelector:@selector(didClickSendWithText:model:)]) { + [self.delegate didClickSendWithText:self.textField.text model:self.model]; + } return YES; } -(void)textFieldDidEndEditing:(UITextField *)textField{ @@ -103,6 +111,11 @@ [self.delegate didResignFirstResponder]; } } +-(void)textFieldDidBeginEditing:(UITextField *)textField{ + if (self.delegate && [self.delegate respondsToSelector:@selector(didBecomeFirstResponder)]) { + [self.delegate didBecomeFirstResponder]; + } +} -(void)setModel:(QXDynamicCommentListModel *)model{ _model = model; } @@ -111,6 +124,10 @@ } -(void)sendAction{ + if (self.textField.text.length == 0) { + showToast(@"内容不能为空"); + return; + } if (self.delegate && [self.delegate respondsToSelector:@selector(didClickSendWithText:model:)]) { [self.delegate didClickSendWithText:self.textField.text model:self.model]; } diff --git a/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m b/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m index c4637e8..d362659 100644 --- a/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m +++ b/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m @@ -54,7 +54,7 @@ [self.bankAddressTextField addRoundedCornersWithRadius:11]; [self.view addSubview:self.bankAddressTextField]; - self.commitBtn = [[UIButton alloc] initWithFrame:CGRectMake(38, self.bankNumberTextField.bottom+16, SCREEN_WIDTH-38*2, 42)]; + self.commitBtn = [[UIButton alloc] initWithFrame:CGRectMake(38, self.bankAddressTextField.bottom+16, SCREEN_WIDTH-38*2, 42)]; } diff --git a/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/Contents.json b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/Contents.json new file mode 100644 index 0000000..04d97b3 --- /dev/null +++ b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_day_task@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_day_task@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@2x.png b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@2x.png new file mode 100644 index 0000000..f31c43d Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@3x.png b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@3x.png new file mode 100644 index 0000000..8652362 Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/room_day_task.imageset/room_day_task@3x.png differ diff --git a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Contents.json b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Contents.json index 4508dda..662753d 100644 --- a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Contents.json +++ b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "Group 7257@2x.png", + "filename" : "room_sound@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "Group 7257@3x.png", + "filename" : "room_sound@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@2x.png b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@2x.png deleted file mode 100644 index 0735840..0000000 Binary files a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@2x.png and /dev/null differ diff --git a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@3x.png b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@3x.png deleted file mode 100644 index 670637f..0000000 Binary files a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/Group 7257@3x.png and /dev/null differ diff --git a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@2x.png b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@2x.png new file mode 100644 index 0000000..a06fed6 Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@3x.png b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@3x.png new file mode 100644 index 0000000..62e8ed9 Binary files /dev/null and b/QXLive/Other/Assets.xcassets/room/room_sound.imageset/room_sound@3x.png differ diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController.m b/QXLive/Room(房间)/Controller/QXRoomViewController.m index 85834f6..5ef8b0e 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController.m +++ b/QXLive/Room(房间)/Controller/QXRoomViewController.m @@ -37,6 +37,8 @@ #import "QXRedBagRecordViewController.h" #import "QXRoomEmojiView.h" #import "QXGiftDisplayManager.h" +#import "QXRoomDayTaskTagView.h" +#import "QXTaskViewController.h" @interface QXRoomViewController ()< QXRoomBottomViewDelegate, @@ -85,6 +87,7 @@ QXRoomUserInfoViewDelegate @property (nonatomic,strong)QXAllRoomHourRankTagView *hourRankIconView; @property (nonatomic,strong)QXRoomEmojiView *emojiView; +@property (nonatomic,strong)QXRoomDayTaskTagView *dayTaskTagView; @end @implementation QXRoomViewController @@ -177,14 +180,14 @@ QXRoomUserInfoViewDelegate [self.upSeatBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(-16); make.size.mas_equalTo(CGSizeMake(ScaleWidth(56), ScaleWidth(27))); - make.bottom.equalTo(self.bottomView.mas_top).offset(-34); + make.bottom.equalTo(self.bottomView.mas_top).offset(-18); }]; self.soundBtn.hidden = YES; [self.view addSubview:self.soundBtn]; [self.soundBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self.upSeatBtn); - make.size.mas_equalTo(CGSizeMake(ScaleWidth(52), ScaleWidth(52))); + make.size.mas_equalTo(CGSizeMake(ScaleWidth(52), ScaleWidth(25))); make.bottom.equalTo(self.upSeatBtn.mas_top).offset(-12); }]; @@ -217,6 +220,7 @@ QXRoomUserInfoViewDelegate [self.view addSubview:self.hourRankIconView]; [self.view addSubview:self.redBagTagView]; + [self.view addSubview:self.dayTaskTagView]; [self setupEffectView]; // [self.view addSubview:self.headlineView]; @@ -812,6 +816,7 @@ QXRoomUserInfoViewDelegate if (toPitNumber == 9) { self.soundBtn.hidden = NO; self.titleView.isCompere = YES; + self.seatContentView.myPitNumber = toPitNumber; }else{ self.soundBtn.hidden = YES; self.titleView.isCompere = NO; @@ -2004,5 +2009,16 @@ QXRoomUserInfoViewDelegate } return _emojiView; } +-(QXRoomDayTaskTagView *)dayTaskTagView{ + if (!_dayTaskTagView) { + _dayTaskTagView = [[QXRoomDayTaskTagView alloc] init]; + MJWeakSelf + _dayTaskTagView.startBlock = ^{ + QXTaskViewController *vc = [[QXTaskViewController alloc] init]; + [weakSelf.navigationController pushViewController:vc animated:YES]; + }; + } + return _dayTaskTagView; +} @end diff --git a/QXLive/Room(房间)/View/QXRoomBottomView.m b/QXLive/Room(房间)/View/QXRoomBottomView.m index 3a80af6..972d535 100644 --- a/QXLive/Room(房间)/View/QXRoomBottomView.m +++ b/QXLive/Room(房间)/View/QXRoomBottomView.m @@ -11,7 +11,8 @@ #import "QXBadgeButton.h" #import "AppDelegate.h" -@interface QXRoomBottomView() +@interface QXRoomBottomView() +@property (nonatomic,strong)UIView *inputBigBgView; @property (nonatomic,strong)UIView *sayBg; @property (nonatomic,strong)UIButton *emojiBtn; @property (nonatomic,strong)UIButton *chatBtn; @@ -405,6 +406,10 @@ } -(void)didResignFirstResponder{ self.redpacketModel = nil; + [self.inputBigBgView removeFromSuperview]; +} +-(void)didBecomeFirstResponder{ + [self.vc.view insertSubview:self.inputBigBgView belowSubview:self.commentView]; } -(QXDynamicCommentInputView *)commentView{ if (!_commentView) { @@ -413,4 +418,20 @@ } return _commentView; } +-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ + return touch.view == self.inputBigBgView; +} +-(void)hideInput{ + [self.commentView.textField resignFirstResponder]; +} + +-(UIView *)inputBigBgView{ + if (!_inputBigBgView) { + _inputBigBgView = [[UIView alloc] initWithFrame:UIScreen.mainScreen.bounds]; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideInput)]; + tap.delegate = self; + [_inputBigBgView addGestureRecognizer:tap]; + } + return _inputBigBgView; +} @end diff --git a/QXLive/Room(房间)/View/QXRoomChatListView.m b/QXLive/Room(房间)/View/QXRoomChatListView.m index ece5592..4154f5c 100644 --- a/QXLive/Room(房间)/View/QXRoomChatListView.m +++ b/QXLive/Room(房间)/View/QXRoomChatListView.m @@ -11,7 +11,7 @@ #define messageNameColor RGB16(0x00C8FF) #define messageGiftColor RGB16(0xFFE309) #define messageBubbleColor RGB16A(0x000000, 0.3) -#define messageBubbleMargin 4 +#define messageBubbleMargin 2 NSArray *findAllOccurrencesOfString(NSString *fullString, NSString *substring) { NSMutableArray *occurrences = [NSMutableArray array]; NSRange searchRange = NSMakeRange(0, fullString.length); @@ -316,13 +316,7 @@ NSInteger maxMessageCount = 20; height = 28+19+13+8 + height; } }else if (model.messageType == QXRoomChatMessageTypeGift) { -// if ([model.FromUserInfo.chat_bubble isExist]) { -// height = [model.text heightForFont:[UIFont systemFontOfSize:14] width:ScaleWidth(280)-16*2-8]; -// height = 16*2 + height+1; -// }else{ - height = [model.text heightForFont:[UIFont systemFontOfSize:14] width:ScaleWidth(280)-16*2-8]; - height = 8*2+messageBubbleMargin*2 + height+1; -// } + height = [model.text heightForFont:[UIFont systemFontOfSize:12] width:ScaleWidth(280)-16-8-8*2] + 12+4+1; }else if(model.messageType == QXRoomChatMessageTypeEmoji){ if ([model.FromUserInfo.chat_bubble isExist]) { height = 28+19+13+16 + 40; @@ -330,7 +324,7 @@ NSInteger maxMessageCount = 20; height = 28+19+13+8 + 40; } }else{ - height = [model.text heightForFont:[UIFont systemFontOfSize:14] width:ScaleWidth(280)-16-8-8*2] + 12+16+1; + height = [model.text heightForFont:[UIFont systemFontOfSize:12] width:ScaleWidth(280)-16-8-8*2] + 12+4+1; } return height; @@ -487,6 +481,7 @@ NSInteger maxMessageCount = 20; -(void)initSubviews{ self.bgView = [[UIView alloc] init]; [self.contentView addSubview:self.bgView]; + [self.bgView addRoundedCornersWithRadius:8]; [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(16); make.right.mas_equalTo(0); @@ -501,7 +496,9 @@ NSInteger maxMessageCount = 20; self.bubbleImageView.backgroundColor = messageBubbleColor; [self.bgView addSubview:self.bubbleImageView]; [self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.equalTo(self.bgView); + make.left.right.equalTo(self.bgView); + make.top.mas_equalTo(-4); + make.bottom.mas_equalTo(4); }]; self.headerImageView = [[UIImageView alloc] init]; @@ -601,7 +598,7 @@ NSInteger maxMessageCount = 20; make.top.mas_equalTo(19); }]; }else{ - self.bgView.backgroundColor = UIColor.clearColor; + self.bgView.backgroundColor = messageBubbleColor; [self.bgView mas_updateConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(16); make.right.mas_equalTo(-8); @@ -613,7 +610,7 @@ NSInteger maxMessageCount = 20; make.top.mas_equalTo(11); }]; self.bubbleImageView.image = nil; - self.bubbleImageView.backgroundColor = messageBubbleColor; + self.bubbleImageView.backgroundColor = UIColor.clearColor; } } -(NSMutableArray *)iconViewArray{ @@ -758,7 +755,7 @@ NSInteger maxMessageCount = 20; self.titleLabel = [[UILabel alloc] init]; self.titleLabel.textColor = [UIColor whiteColor]; - self.titleLabel.font = [UIFont systemFontOfSize:14]; + self.titleLabel.font = [UIFont systemFontOfSize:12]; self.titleLabel.numberOfLines = 0; [self.bgView addSubview:self.titleLabel]; // [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { @@ -768,8 +765,8 @@ NSInteger maxMessageCount = 20; // }]; [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.bgView).offset(8); - make.top.mas_equalTo(8); - make.bottom.mas_equalTo(-8); + make.top.mas_equalTo(2); + make.bottom.mas_equalTo(-2); make.right.mas_equalTo(-8); }]; @@ -806,6 +803,10 @@ NSInteger maxMessageCount = 20; // [self.iconViewArray addObject:iconImageView]; // } +} +-(void)layoutSubviews{ + [super layoutSubviews]; + [self.bgView addRoundedCornersWithRadius:self.bgView.height/2]; } -(void)loadBubble{ // if ([self.message.FromUserInfo.chat_bubble isExist]) { @@ -937,7 +938,9 @@ NSInteger maxMessageCount = 20; self.bubbleImageView.backgroundColor = messageBubbleColor; [self.bgView addSubview:self.bubbleImageView]; [self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.equalTo(self.bgView); + make.left.right.equalTo(self.bgView); + make.top.mas_equalTo(-4); + make.bottom.mas_equalTo(4); }]; self.headerImageView = [[UIImageView alloc] init]; @@ -1077,7 +1080,14 @@ NSInteger maxMessageCount = 20; } return self; } - +-(void)layoutSubviews{ + [super layoutSubviews]; + if (self.message.messageType == QXRoomChatMessageTypeNotice) { + [self.bgView addRoundedCornersWithRadius:8]; + }else{ + [self.bgView addRoundedCornersWithRadius:self.bgView.height/2]; + } +} -(void)setMessage:(QXRoomChatListModel *)message{ _message = message; NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:message.text]; @@ -1115,7 +1125,7 @@ NSInteger maxMessageCount = 20; } } if (message.messageType == QXRoomChatMessageTypeNotice) { - [attr yy_setColor:messageNameColor range:NSMakeRange(0, attr.length)]; + [attr yy_setColor:messageNoticeColor range:NSMakeRange(0, attr.length)]; } self.titleLabel.attributedText = attr; } @@ -1136,13 +1146,13 @@ NSInteger maxMessageCount = 20; self.titleLabel = [[UILabel alloc] init]; // self.titleLabel.textColor = RGB16(0XD1A9FE); self.titleLabel.textColor = UIColor.whiteColor; - self.titleLabel.font = [UIFont systemFontOfSize:14]; + self.titleLabel.font = [UIFont systemFontOfSize:12]; self.titleLabel.numberOfLines = 0; [self.bgView addSubview:self.titleLabel]; [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.bgView).offset(8); - make.top.mas_equalTo(8); - make.bottom.mas_equalTo(-8); + make.top.mas_equalTo(2); + make.bottom.mas_equalTo(-2); make.right.mas_equalTo(-8); }]; } diff --git a/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.h b/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.h new file mode 100644 index 0000000..7a126d2 --- /dev/null +++ b/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.h @@ -0,0 +1,16 @@ +// +// QXRoomDayTaskTagView.h +// QXLive +// +// Created by 启星 on 2025/10/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QXRoomDayTaskTagView : UIView +@property (nonatomic,copy)void(^startBlock)(void); +@end + +NS_ASSUME_NONNULL_END diff --git a/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.m b/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.m new file mode 100644 index 0000000..cf94cf4 --- /dev/null +++ b/QXLive/Room(房间)/View/每日任务/QXRoomDayTaskTagView.m @@ -0,0 +1,64 @@ +// +// QXRoomDayTaskTagView.m +// QXLive +// +// Created by 启星 on 2025/10/27. +// + +#import "QXRoomDayTaskTagView.h" +@interface QXRoomDayTaskTagView() +@property (nonatomic,strong)UIImageView *imageView; +@property (nonatomic,strong)UILabel *timeLabel; +@property (nonatomic,strong)UIButton *btn; +@end +@implementation QXRoomDayTaskTagView + +- (instancetype)init +{ + self = [super init]; + if (self) { + self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-330, 80, 60); + [self initSubviews]; + } + return self; +} + +-(void)initSubviews{ + self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_day_task"]]; + self.imageView.frame = CGRectMake(0, 0, 80, 60); + [self addSubview:self.imageView]; + + self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.imageView.bottom, self.width, 20)]; + self.timeLabel.textAlignment = NSTextAlignmentCenter; + self.timeLabel.font = [UIFont systemFontOfSize:12]; + self.timeLabel.textColor = RGB16(0xFFEBBD); + [self addSubview:self.timeLabel]; + 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{ + if (self.startBlock) { + self.startBlock(); + } +} +-(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(SCREEN_WIDTH-ScaleWidth(80)/2, + recognizer.view.center.y + translation.y); + [recognizer setTranslation:CGPointZero inView:self.viewController.view]; +} +@end diff --git a/QXLive/Room(房间)/View/点歌/QXRoomSongListCell.xib b/QXLive/Room(房间)/View/点歌/QXRoomSongListCell.xib index 3ae24ee..5409da6 100644 --- a/QXLive/Room(房间)/View/点歌/QXRoomSongListCell.xib +++ b/QXLive/Room(房间)/View/点歌/QXRoomSongListCell.xib @@ -40,10 +40,10 @@