From 64cfb1b10e4ab870cfaccfee00183f2cabd8b1c3 Mon Sep 17 00:00:00 2001 From: edwinQQQ Date: Tue, 12 Aug 2025 17:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Banner=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=89=8B=E5=8A=BF=E7=B3=BB=E7=BB=9F=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=8C=96=E6=89=8B=E5=8A=BF=E8=AF=86=E5=88=AB?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BD=93=E9=AA=8C=EF=BC=9B=E8=B0=83=E6=95=B4Banner=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=EF=BC=8C=E7=A1=AE=E4=BF=9D=E9=80=82=E9=85=8D=E6=80=A7?= =?UTF-8?q?=EF=BC=9B=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E5=8D=87=E4=BB=A3=E7=A0=81=E6=95=B4=E6=B4=81?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E5=8F=AF=E7=BB=B4=E6=8A=A4=E6=80=A7=EF=BC=9B?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3=E6=96=87=E6=A1=A3=E4=BB=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=B0=E6=89=8B=E5=8A=BF=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=9A=84=E9=9B=86=E6=88=90=E5=92=8C=E4=BD=BF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 1 + DOC/新Banner组件架构设计.md | 3 +- .../AnimationView/GameUniversalBannerView.m | 3 +- .../LuckyGiftWinningBannerView.m | 24 - .../View/AnimationView/RoomAnimationView.h | 11 +- .../View/AnimationView/RoomAnimationView.m | 781 +++++++++++++++++- .../RoomHighValueGiftBannerAnimation.m | 3 +- .../XPRoomFunctionContainerView.h | 6 + .../View/MSRoomOnLineView/MSRoomOnLineView.m | 2 - .../YMRoom/View/XPRoomViewController.m | 2 +- YuMi/Network/HttpRequestHelper.m | 4 +- 11 files changed, 803 insertions(+), 37 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e0910948..f98b42a8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,6 +31,7 @@ "NSURL", "objc", "Offical", + "Podfile", "Procotol", "QGVAP", "Subview", diff --git a/DOC/新Banner组件架构设计.md b/DOC/新Banner组件架构设计.md index 083f084c..33c1afb6 100644 --- a/DOC/新Banner组件架构设计.md +++ b/DOC/新Banner组件架构设计.md @@ -391,8 +391,7 @@ extern NSString * const kYMBannerTrackingKeyReason; // reason #### 2.1 新增文件结构 -``` -YuMi/Modules/YMRoom/View/Banner/ +```YuMi/Modules/YMRoom/View/Banner/ ├── Base/ │ ├── YMBaseBannerView.h/.m │ ├── YMBaseBannerViewModel.h/.m diff --git a/YuMi/Modules/YMRoom/View/AnimationView/GameUniversalBannerView.m b/YuMi/Modules/YMRoom/View/AnimationView/GameUniversalBannerView.m index e235b986..dc9288c1 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/GameUniversalBannerView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/GameUniversalBannerView.m @@ -362,7 +362,8 @@ if ([self.goButton pointInside:goButtonPoint withEvent:event]) { return self.goButton; } - return nil; + // 其他区域返回self,允许触摸事件被处理(包括手势识别器) + return self; } @end diff --git a/YuMi/Modules/YMRoom/View/AnimationView/LuckyGiftWinningBannerView.m b/YuMi/Modules/YMRoom/View/AnimationView/LuckyGiftWinningBannerView.m index c3b09485..21829c99 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/LuckyGiftWinningBannerView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/LuckyGiftWinningBannerView.m @@ -175,24 +175,6 @@ exitCurrentRoom:(void(^)(void))exit { self.giftNameLabel.text = [model giftName]; self.timesLabel.text = model.times; self.coinsLabel.text = model.coins; - -// if (self.coinsLabel.text.integerValue > 9999) { -// self.bigBallImageView.hidden = NO; -// } else { -// self.ballImageView.hidden = NO; -// } - -// [self.coinsLabel mas_remakeConstraints:^(MASConstraintMaker *make) { -// if (self.bigBallImageView.hidden == NO) { -// make.centerX.mas_equalTo(self.bigBallImageView); -// make.width.mas_lessThanOrEqualTo(self.bigBallImageView).multipliedBy(0.8); -// } else { -// make.centerX.mas_equalTo(self.ballImageView); -// make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8); -// } -// make.top.mas_equalTo(self).offset(kGetScaleWidth(18)); -// make.height.mas_equalTo(kGetScaleWidth(28)); -// }]; } - (instancetype)initWithFrame:(CGRect)frame { @@ -232,12 +214,6 @@ exitCurrentRoom:(void(^)(void))exit { [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(self); }]; - -// [self addSubview:self.bigBallImageView]; -// [self.bigBallImageView mas_makeConstraints:^(MASConstraintMaker *make) { -// make.centerY.trailing.mas_equalTo(self); -// make.width.height.mas_equalTo(kGetScaleWidth(91)); -// }]; [self addSubview:self.ballImageView]; [self.ballImageView mas_makeConstraints:^(MASConstraintMaker *make) { diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.h b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.h index 4890fecc..5fd07a4d 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.h +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.h @@ -5,13 +5,22 @@ // Created by P on 2025/1/13. // +#import #import "XPRoomAnimationHitView.h" #import "RoomHostDelegate.h" #import "RoomGuestDelegate.h" +// Banner区域枚举 +typedef NS_ENUM(NSInteger, BannerZone) { + BannerZoneNone = 0, // 无效区域 + BannerZoneCenter, // 中央区域(滑动手势) + BannerZoneLeft, // 左侧区域(点击透传) + BannerZoneRight // 右侧区域(点击透传) +}; + NS_ASSUME_NONNULL_BEGIN -@interface RoomAnimationView : XPRoomAnimationHitView +@interface RoomAnimationView : XPRoomAnimationHitView - (instancetype)initWithHostDelegate:(id)hDelegate; - (void)resumeTimer; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m index b9dccb1f..e4399f5d 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m @@ -68,6 +68,9 @@ #import "XPRoomAnchorRankBannerView.h" #import "XPRoomGraffitiGiftAnimationView.h" +#import "XPRoomFunctionContainerView.h" +#import "XPRoomRankEntranceView.h" +#import "XPRoomAnchorRankEnterView.h" static const CGFloat kTipViewStayDuration = 3.0; static const CGFloat kTipViewMoveDuration = 0.5; @@ -230,7 +233,7 @@ XPRoomGraffitiGiftAnimationViewDelegate [self.bannerContainer mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self).offset(kNavigationHeight); make.leading.trailing.mas_equalTo(self); - make.height.mas_equalTo(180); + make.height.mas_equalTo(80); }]; } @@ -249,9 +252,713 @@ XPRoomGraffitiGiftAnimationViewDelegate - (void)setupBanner { _roomBannertModelsQueueV2 = [NSMutableArray array]; - // [self addBnnerContainGesture]; // 注释掉这行 + // 新方案:启用区域化Banner手势系统 + [self setupZonedBannerGesture]; } +#pragma mark - Zoned Banner Gesture System + +- (void)setupZonedBannerGesture { + NSLog(@"🚀 新方案: 启用区域化Banner手势系统"); + + // 1. 添加中央区域滑动手势 + UIPanGestureRecognizer *centerPanGesture = + [[UIPanGestureRecognizer alloc] initWithTarget:self + action:@selector(handleCenterPan:)]; + centerPanGesture.delegate = self; + centerPanGesture.minimumNumberOfTouches = 1; + centerPanGesture.maximumNumberOfTouches = 1; + [self.bannerContainer addGestureRecognizer:centerPanGesture]; + + // 2. 添加中央区域点击手势(备选) + UITapGestureRecognizer *centerTapGesture = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(handleCenterTap:)]; + centerTapGesture.delegate = self; + [self.bannerContainer addGestureRecognizer:centerTapGesture]; + + // 3. 添加左右区域点击手势 + UITapGestureRecognizer *leftTapGesture = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(handleLeftTap:)]; + leftTapGesture.delegate = self; + [self.bannerContainer addGestureRecognizer:leftTapGesture]; + + UITapGestureRecognizer *rightTapGesture = + [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(handleRightTap:)]; + rightTapGesture.delegate = self; + [self.bannerContainer addGestureRecognizer:rightTapGesture]; + + // 4. 设置手势优先级:中央区域Pan优先于Tap + [centerTapGesture requireGestureRecognizerToFail:centerPanGesture]; + + // 5. 手势事件传递配置 + centerPanGesture.cancelsTouchesInView = NO; + centerPanGesture.delaysTouchesBegan = NO; + centerPanGesture.delaysTouchesEnded = NO; + + centerTapGesture.cancelsTouchesInView = NO; + centerTapGesture.delaysTouchesBegan = NO; + centerTapGesture.delaysTouchesEnded = NO; + + leftTapGesture.cancelsTouchesInView = NO; + leftTapGesture.delaysTouchesBegan = NO; + leftTapGesture.delaysTouchesEnded = NO; + + rightTapGesture.cancelsTouchesInView = NO; + rightTapGesture.delaysTouchesBegan = NO; + rightTapGesture.delaysTouchesEnded = NO; + + NSLog(@"✅ 区域化Banner手势配置完成"); + NSLog(@" - 中央区域: Pan手势 + Tap手势(备选)"); + NSLog(@" - 左右区域: Tap手势(透传)"); + NSLog(@" - 手势优先级: 中央Pan优先于中央Tap"); + NSLog(@" - bannerContainer手势数量: %ld", (long)self.bannerContainer.gestureRecognizers.count); + + // 验证手势识别器是否正确添加 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + NSLog(@" - 手势: %@ (delegate: %@)", NSStringFromClass([gesture class]), gesture.delegate ? @"已设置" : @"未设置"); + } + + // 添加调试视图(仅在测试环境) + [self addZoneDebugViews]; + + // 确保bannerContainer可以接收用户交互 + self.bannerContainer.userInteractionEnabled = YES; + NSLog(@"🔧 bannerContainer用户交互已启用: %@", self.bannerContainer.userInteractionEnabled ? @"是" : @"否"); + + // 检查并启用所有Banner子视图的用户交互 + for (UIView *subview in self.bannerContainer.subviews) { + if (!subview.userInteractionEnabled) { + subview.userInteractionEnabled = YES; + NSLog(@"🔧 启用Banner子视图用户交互: %@", NSStringFromClass([subview class])); + } + + // 特别处理LuckyGiftWinningBannerView的按钮冲突 + if ([NSStringFromClass([subview class]) containsString:@"LuckyGiftWinningBannerView"]) { + NSLog(@"🔧 检测到LuckyGiftWinningBannerView,将在配置方法中处理"); + } + } + + // 验证手势识别器状态 + NSLog(@"🔧 手势识别器验证:"); + NSLog(@" - bannerContainer手势数量: %ld", (long)self.bannerContainer.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + NSLog(@" - 手势: %@ (enabled: %@, delegate: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否", + gesture.delegate ? @"已设置" : @"未设置"); + } +} + +#pragma mark - Zone Calculation + +- (CGRect)getCenterZone { + CGFloat containerWidth = self.bannerContainer.bounds.size.width; + CGFloat centerWidth = containerWidth * 2.0 / 3.0; // 2/3 容器宽度 + CGFloat centerX = (containerWidth - centerWidth) / 2.0; + + return CGRectMake(centerX, 0, centerWidth, self.bannerContainer.bounds.size.height); +} + +- (CGRect)getLeftZone { + CGFloat containerWidth = self.bannerContainer.bounds.size.width; + CGFloat zoneWidth = containerWidth / 6.0; // 1/6 容器宽度 + + return CGRectMake(0, 0, zoneWidth, self.bannerContainer.bounds.size.height); +} + +- (CGRect)getRightZone { + CGFloat containerWidth = self.bannerContainer.bounds.size.width; + CGFloat zoneWidth = containerWidth / 6.0; // 1/6 容器宽度 + CGFloat rightX = containerWidth - zoneWidth; + + return CGRectMake(rightX, 0, zoneWidth, self.bannerContainer.bounds.size.height); +} + +- (BannerZone)getZoneForPoint:(CGPoint)point { + CGRect centerZone = [self getCenterZone]; + CGRect leftZone = [self getLeftZone]; + CGRect rightZone = [self getRightZone]; + + NSLog(@"🎯 区域计算 - 触摸点:(%.1f,%.1f)", point.x, point.y); + NSLog(@" - 中央区域: (%.1f,%.1f,%.1f,%.1f)", centerZone.origin.x, centerZone.origin.y, centerZone.size.width, centerZone.size.height); + NSLog(@" - 左侧区域: (%.1f,%.1f,%.1f,%.1f)", leftZone.origin.x, leftZone.origin.y, leftZone.size.width, leftZone.size.height); + NSLog(@" - 右侧区域: (%.1f,%.1f,%.1f,%.1f)", rightZone.origin.x, rightZone.origin.y, rightZone.size.width, rightZone.size.height); + + if (CGRectContainsPoint(centerZone, point)) { + NSLog(@"🎯 触摸点在中央区域"); + return BannerZoneCenter; + } else if (CGRectContainsPoint(leftZone, point)) { + NSLog(@"🎯 触摸点在左侧区域"); + return BannerZoneLeft; + } else if (CGRectContainsPoint(rightZone, point)) { + NSLog(@"🎯 触摸点在右侧区域"); + return BannerZoneRight; + } + + NSLog(@"🎯 触摸点在无效区域"); + return BannerZoneNone; +} + +#pragma mark - Visual Debug (Test Environment) + +- (void)addZoneDebugViews { + // 仅在测试环境添加 + #ifdef DEBUG + NSLog(@"🎨 开始添加区域调试视图"); + NSLog(@" - bannerContainer: %@ (frame: %.1f,%.1f,%.1f,%.1f)", + self.bannerContainer ? @"存在" : @"nil", + self.bannerContainer.frame.origin.x, self.bannerContainer.frame.origin.y, + self.bannerContainer.frame.size.width, self.bannerContainer.frame.size.height); + + // 延迟添加,确保布局完成 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + // 中央区域 - 半透明蓝色 + UIView *centerDebugView = [[UIView alloc] init]; + centerDebugView.backgroundColor = [[UIColor blueColor] colorWithAlphaComponent:0.3]; + centerDebugView.frame = [self getCenterZone]; + centerDebugView.userInteractionEnabled = NO; + [self.bannerContainer addSubview:centerDebugView]; + + // 左侧区域 - 半透明红色 + UIView *leftDebugView = [[UIView alloc] init]; + leftDebugView.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.3]; + leftDebugView.frame = [self getLeftZone]; + leftDebugView.userInteractionEnabled = NO; + [self.bannerContainer addSubview:leftDebugView]; + + // 右侧区域 - 半透明绿色 + UIView *rightDebugView = [[UIView alloc] init]; + rightDebugView.backgroundColor = [[UIColor greenColor] colorWithAlphaComponent:0.3]; + rightDebugView.frame = [self getRightZone]; + rightDebugView.userInteractionEnabled = NO; + [self.bannerContainer addSubview:rightDebugView]; + + NSLog(@"🎨 区域调试视图已添加"); + NSLog(@" - 中央区域: 蓝色 (%.1f, %.1f, %.1f, %.1f)", + centerDebugView.frame.origin.x, centerDebugView.frame.origin.y, + centerDebugView.frame.size.width, centerDebugView.frame.size.height); + NSLog(@" - 左侧区域: 红色 (%.1f, %.1f, %.1f, %.1f)", + leftDebugView.frame.origin.x, leftDebugView.frame.origin.y, + leftDebugView.frame.size.width, leftDebugView.frame.size.height); + NSLog(@" - 右侧区域: 绿色 (%.1f, %.1f, %.1f, %.1f)", + rightDebugView.frame.origin.x, rightDebugView.frame.origin.y, + rightDebugView.frame.size.width, rightDebugView.frame.size.height); + }); + #endif +} + +#pragma mark - UIGestureRecognizerDelegate + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { + NSLog(@"🎯 shouldReceiveTouch被调用 - 手势:%@ 触摸:%p", NSStringFromClass([gestureRecognizer class]), touch); + + CGPoint touchPoint = [touch locationInView:self.bannerContainer]; + BannerZone zone = [self getZoneForPoint:touchPoint]; + + // 检查触摸的目标视图 + UIView *hitView = [self.bannerContainer hitTest:touchPoint withEvent:nil]; + NSString *hitViewClass = hitView ? NSStringFromClass([hitView class]) : @"nil"; + + // 检查触摸事件是否被拦截 + if (hitView && hitView != self.bannerContainer) { + NSLog(@"🎯 触摸被视图拦截: %@", hitViewClass); + // 检查拦截视图的用户交互设置 + NSLog(@"🎯 拦截视图用户交互: %@", hitView.userInteractionEnabled ? @"启用" : @"禁用"); + + // 特别检查GameUniversalBannerView + if ([hitViewClass containsString:@"GameUniversalBannerView"]) { + NSLog(@"🎯 GameUniversalBannerView拦截了触摸事件"); + } + } + + NSString *gestureType = @"Unknown"; + if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { + gestureType = @"Pan"; + } else if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) { + gestureType = @"Tap"; + } + + NSString *zoneName = @"None"; + switch (zone) { + case BannerZoneCenter: zoneName = @"Center"; break; + case BannerZoneLeft: zoneName = @"Left"; break; + case BannerZoneRight: zoneName = @"Right"; break; + case BannerZoneNone: zoneName = @"None"; break; + } + + NSLog(@"🎯 Banner手势判断: %@手势 - 触摸点:(%.1f,%.1f) 区域:%@ hitView:%@", + gestureType, touchPoint.x, touchPoint.y, zoneName, hitViewClass); + + // 检查是否在有效区域内 + if (zone == BannerZoneNone) { + NSLog(@"🎯 ❌ %@手势在有效区域外被拒绝", gestureType); + return NO; + } + + // 额外检查:确保触摸点确实在bannerContainer的边界内 + if (!CGRectContainsPoint(self.bannerContainer.bounds, touchPoint)) { + NSLog(@"🎯 ❌ %@手势在bannerContainer边界外被拒绝 - 触摸点:(%.1f,%.1f) 容器边界:(%.1f,%.1f,%.1f,%.1f)", + gestureType, touchPoint.x, touchPoint.y, + self.bannerContainer.bounds.origin.x, self.bannerContainer.bounds.origin.y, + self.bannerContainer.bounds.size.width, self.bannerContainer.bounds.size.height); + return NO; + } + + // 根据手势类型和区域进行判断 + if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { + // Pan手势只在中央区域允许,且优先于按钮点击 + if (zone == BannerZoneCenter) { + if ([hitView isKindOfClass:[UIButton class]]) { + NSLog(@"🎯 ✅ Pan手势在中央区域按钮上被允许(滑动优先)"); + } else { + NSLog(@"🎯 ✅ Pan手势在中央区域被允许"); + } + return YES; + } else { + NSLog(@"🎯 ❌ Pan手势在%@区域被拒绝", zoneName); + return NO; + } + } + + if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) { + // Tap手势:在按钮区域拒绝,在其他区域允许 + if ([hitView isKindOfClass:[UIButton class]]) { + NSLog(@"🎯 ❌ Tap手势在按钮区域被拒绝(保护按钮点击)"); + return NO; + } + + NSLog(@"🎯 ✅ Tap手势在%@区域被允许", zoneName); + return YES; + } + + NSLog(@"🎯 ❌ 未知手势类型被拒绝"); + return NO; +} + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer +shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + // 允许同时识别,通过 shouldReceiveTouch 精确控制 + NSLog(@"🎯 手势同时识别: %@ 与 %@", + NSStringFromClass([gestureRecognizer class]), + NSStringFromClass([otherGestureRecognizer class])); + return YES; +} + +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { + NSString *gestureType = @"Unknown"; + if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { + gestureType = @"Pan"; + } else if ([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]]) { + gestureType = @"Tap"; + } + + NSLog(@"🎯 手势开始检查: %@手势 - ShouldBegin被调用", gestureType); + + // 检查Banner容器状态 + if (!self.bannerContainer.userInteractionEnabled) { + NSLog(@"🎯 ❌ Banner容器交互被禁用"); + return NO; + } + + // 检查是否有Banner显示 + if (self.bannerContainer.subviews.count == 0) { + NSLog(@"🎯 ❌ 没有Banner子视图"); + return NO; + } + + // 检查Banner容器是否可见且有效 + if (self.bannerContainer.hidden || self.bannerContainer.alpha <= 0.01) { + NSLog(@"🎯 ❌ Banner容器不可见"); + return NO; + } + + // 检查Banner容器是否有有效的frame + if (CGRectIsEmpty(self.bannerContainer.frame) || CGRectIsNull(self.bannerContainer.frame)) { + NSLog(@"🎯 ❌ Banner容器frame无效"); + return NO; + } + + NSLog(@"🎯 ✅ %@手势允许开始", gestureType); + return YES; +} + +#pragma mark - Gesture Handlers + +- (void)handleCenterPan:(UIPanGestureRecognizer *)gesture { + static NSInteger callCount = 0; + callCount++; + NSLog(@"🔥 中央区域Pan手势 - 第%ld次", (long)callCount); + NSLog(@"🔥 Pan手势被触发!手势状态: %ld", (long)gesture.state); + NSLog(@"🔥 Pan手势视图: %@", gesture.view); + + // 检查是否有Banner显示 + if (self.bannerContainer.subviews.count == 0) { + NSLog(@"🔥 ❌ 没有Banner显示,忽略手势"); + return; + } + + NSString *stateString = @"Unknown"; + switch (gesture.state) { + case UIGestureRecognizerStatePossible: stateString = @"Possible"; break; + case UIGestureRecognizerStateBegan: stateString = @"Began"; break; + case UIGestureRecognizerStateChanged: stateString = @"Changed"; break; + case UIGestureRecognizerStateEnded: stateString = @"Ended"; break; + case UIGestureRecognizerStateCancelled: stateString = @"Cancelled"; break; + case UIGestureRecognizerStateFailed: stateString = @"Failed"; break; + } + + CGPoint velocity = [gesture velocityInView:self.bannerContainer]; + CGPoint translation = [gesture translationInView:self.bannerContainer]; + + NSLog(@"👆 中央区域滑动状态: %@ - 速度:(%.1f,%.1f) 距离:(%.1f,%.1f)", + stateString, velocity.x, velocity.y, translation.x, translation.y); + + static const CGFloat kVelocityThreshold = 500.0; + static const CGFloat kDistanceThreshold = 100.0; + + switch (gesture.state) { + case UIGestureRecognizerStateBegan: + NSLog(@"✅ 中央区域滑动: 开始识别 - RTL: %@", isMSRTL() ? @"是" : @"否"); + break; + + case UIGestureRecognizerStateChanged: { + BOOL isHorizontalSwipe = fabs(velocity.x) > fabs(velocity.y); + BOOL isCorrectDirection = isMSRTL() ? (velocity.x > 0) : (velocity.x < 0); + BOOL isEnoughVelocity = fabs(velocity.x) > kVelocityThreshold; + BOOL isEnoughDistance = fabs(translation.x) > kDistanceThreshold; + + if (isHorizontalSwipe && isCorrectDirection && + (isEnoughVelocity || isEnoughDistance)) { + NSLog(@"✅ 中央区域滑动: 满足移除条件 - 速度:%.1f 距离:%.1f", fabs(velocity.x), fabs(translation.x)); + [self handleSwipeOutBanner]; + gesture.state = UIGestureRecognizerStateEnded; + } + break; + } + + case UIGestureRecognizerStateEnded: + case UIGestureRecognizerStateCancelled: + NSLog(@"👆 中央区域滑动: 结束"); + break; + + default: + break; + } +} + +- (void)handleCenterTap:(UITapGestureRecognizer *)gesture { + CGPoint touchPoint = [gesture locationInView:self.bannerContainer]; + NSLog(@"🎯 中央区域点击: 传递到Banner处理 - 触摸点:(%.1f,%.1f)", touchPoint.x, touchPoint.y); + + // 检查是否有Banner显示 + if (self.bannerContainer.subviews.count == 0) { + NSLog(@"🎯 ❌ 没有Banner显示,忽略点击"); + return; + } + + // 传递点击事件到Banner内部处理 + [self forwardTapToBanner:touchPoint]; +} + +- (void)handleLeftTap:(UITapGestureRecognizer *)gesture { + CGPoint touchPoint = [gesture locationInView:self.bannerContainer]; + if (touchPoint.x > KScreenWidth/2) { + NSLog(@"🎯 左侧区域点击: 不是左侧区域 - 触摸点:(%.1f,%.1f)", touchPoint.x, touchPoint.y); + return; + } + NSLog(@"🎯 左侧区域点击: 检查Banner处理能力 - 触摸点:(%.1f,%.1f)", touchPoint.x, touchPoint.y); + + // 检查是否有Banner显示 + if (self.bannerContainer.subviews.count == 0) { + NSLog(@"🎯 ❌ 没有Banner显示,忽略点击"); + return; + } + + // 先尝试让Banner处理,不能处理则透传 + if (![self forwardTapToBanner:touchPoint]) { + NSLog(@"📱 左侧区域点击: Banner无法处理,透传到底部"); + [self simulatePassthroughTap:touchPoint]; + } +} + +- (void)handleRightTap:(UITapGestureRecognizer *)gesture { + CGPoint touchPoint = [gesture locationInView:self.bannerContainer]; + if (touchPoint.x < KScreenWidth/2) { + NSLog(@"🎯 右侧区域点击: 不是右侧区域 - 触摸点:(%.1f,%.1f)", touchPoint.x, touchPoint.y); + return; + } + NSLog(@"🎯 右侧区域点击: 检查Banner处理能力 - 触摸点:(%.1f,%.1f)", touchPoint.x, touchPoint.y); + + // 检查是否有Banner显示 + if (self.bannerContainer.subviews.count == 0) { + NSLog(@"🎯 ❌ 没有Banner显示,忽略点击"); + return; + } + + // 先尝试让Banner处理,不能处理则透传 + if (![self forwardTapToBanner:touchPoint]) { + NSLog(@"📱 右侧区域点击: Banner无法处理,透传到底部"); + [self simulatePassthroughTap:touchPoint]; + } +} + +#pragma mark - Event Forwarding + +- (BOOL)forwardTapToBanner:(CGPoint)point { + // 查找Banner子视图 + UIView *bannerView = nil; + for (UIView *subview in self.bannerContainer.subviews) { + if (CGRectContainsPoint(subview.frame, point)) { + bannerView = subview; + break; + } + } + + if (bannerView) { + // 转换坐标到Banner视图 + CGPoint bannerPoint = [bannerView convertPoint:point fromView:self.bannerContainer]; + + // 查找可点击的目标 + UIView *targetView = [bannerView hitTest:bannerPoint withEvent:nil]; + + if ([targetView isKindOfClass:[UIButton class]]) { + UIButton *button = (UIButton *)targetView; + [button sendActionsForControlEvents:UIControlEventTouchUpInside]; + NSLog(@"🎯 Banner处理点击: 触发按钮 %@", button.titleLabel.text ?: @"(无标题)"); + return YES; + } else if (targetView && targetView != bannerView) { + NSLog(@"🎯 Banner处理点击: 找到目标视图 %@", NSStringFromClass([targetView class])); + return YES; + } + } + + NSLog(@"🎯 Banner处理点击: 无法处理"); + return NO; +} + +- (void)simulatePassthroughTap:(CGPoint)point { + UIView *hostView = nil; + if ([self.hostDelegate respondsToSelector:@selector(getSuperView)]) { + hostView = [self.hostDelegate getSuperView]; + } + + if (!hostView) { + NSLog(@"📱 Banner穿透点击: 无法获取主视图"); + return; + } + + CGPoint convertedPoint = [hostView convertPoint:point fromView:self.bannerContainer]; + + XPRoomFunctionContainerView *functionView = nil; + for (UIView *subview in hostView.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"XPRoomFunctionContainerView"]) { + functionView = (XPRoomFunctionContainerView *)subview; + break; + } + } + + if (functionView) { + CGPoint functionPoint = [functionView convertPoint:convertedPoint fromView:hostView]; + + if (CGRectContainsPoint(functionView.bounds, functionPoint)) { + UIView *targetView = [functionView hitTest:functionPoint withEvent:nil]; + + if ([targetView isKindOfClass:[UIButton class]]) { + UIButton *button = (UIButton *)targetView; + [button sendActionsForControlEvents:UIControlEventTouchUpInside]; + NSLog(@"📱 Banner穿透点击: 成功触发底部按钮 %@", button.titleLabel.text ?: @"(无标题)"); + } else if ([NSStringFromClass([targetView class]) containsString:@"MSRoomOnLineView"]) { + // 直接调用XPRoomFunctionContainerView的onlineTapRecognizer方法 + if ([functionView respondsToSelector:@selector(onlineTapRecognizer)]) { + [functionView performSelector:@selector(onlineTapRecognizer)]; + NSLog(@"📱 Banner穿透点击: 成功触发MSRoomOnLineView的onlineTapRecognizer"); + } else { + NSLog(@"📱 Banner穿透点击: 无法找到onlineTapRecognizer方法"); + } + } else if ([NSStringFromClass([targetView class]) containsString:@"XPRoomRankEntranceView"] || + [targetView.superview isKindOfClass:[XPRoomRankEntranceView class]]) { + // 触发贡献榜手势 + if ([functionView respondsToSelector:@selector(contributionButtonAction:)]) { + [functionView performSelector:@selector(contributionButtonAction:) withObject:nil]; + NSLog(@"📱 Banner穿透点击: 成功触发XPRoomRankEntranceView的contributionButtonAction"); + } + } else if ([NSStringFromClass([targetView class]) containsString:@"XPRoomAnchorRankEnterView"] || + [targetView.superview isKindOfClass:[XPRoomAnchorRankEnterView class]]) { + // 触发小时榜手势 + if ([functionView respondsToSelector:@selector(onAnchorHourRankButtonAction:)]) { + [functionView performSelector:@selector(onAnchorHourRankButtonAction:) withObject:nil]; + NSLog(@"📱 Banner穿透点击: 成功触发XPRoomAnchorRankEnterView的onAnchorHourRankButtonAction"); + } + } else if ([NSStringFromClass([targetView class]) containsString:@"XPAnchorFansTeamEntranceView"]) { + // 触发粉丝团手势 + if ([functionView respondsToSelector:@selector(tapFansTeamRecognizer)]) { + [functionView performSelector:@selector(tapFansTeamRecognizer)]; + NSLog(@"📱 Banner穿透点击: 成功触发XPAnchorFansTeamEntranceView的tapFansTeamRecognizer"); + } + } else if (targetView) { + NSLog(@"📱 Banner穿透点击: 找到目标视图但不是按钮: %@", NSStringFromClass([targetView class])); + } else { + NSLog(@"📱 Banner穿透点击: 在功能容器范围内但未找到可点击目标"); + } + } else { + NSLog(@"📱 Banner穿透点击: 点击位置不在功能容器范围内"); + } + } else { + NSLog(@"📱 Banner穿透点击: 未找到功能容器"); + } +} + +- (void)handleSwipeOutBanner { + [[NSNotificationCenter defaultCenter] postNotificationName:@"SwipeOutBanner" object:nil]; +} + +#pragma mark - Banner Interaction Management + +- (void)configureBannerInteraction:(UIView *)bannerView { + NSString *bannerClassName = NSStringFromClass([bannerView class]); + NSLog(@"🔧 配置Banner交互: %@", bannerClassName); + + // 确保Banner可以接收用户交互 + bannerView.userInteractionEnabled = YES; + + // 根据Banner类型进行特殊处理 + if ([bannerClassName containsString:@"LuckyGiftWinningBannerView"]) { + NSLog(@"🔧 LuckyGiftWinningBannerView: 处理按钮冲突"); + // 查找覆盖按钮并记录 + for (UIView *subview in bannerView.subviews) { + if ([subview isKindOfClass:[UIButton class]]) { + NSLog(@"🔧 找到LuckyGiftWinningBannerView覆盖按钮"); + } + } + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (LuckyGiftWinningBannerView)"); + } + } + } else if ([bannerClassName containsString:@"GameUniversalBannerView"]) { + NSLog(@"🔧 GameUniversalBannerView: 确保交互启用"); + // 确保所有子视图都可以交互 + [self enableInteractionForView:bannerView]; + + // 检查GameUniversalBannerView是否有自己的手势识别器 + NSLog(@"🔧 GameUniversalBannerView手势识别器数量: %ld", (long)bannerView.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in bannerView.gestureRecognizers) { + NSLog(@"🔧 GameUniversalBannerView手势: %@ (enabled: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否"); + } + } else if ([bannerClassName containsString:@"RoomHighValueGiftBannerAnimation"]) { + NSLog(@"🔧 RoomHighValueGiftBannerAnimation: 确保交互启用"); + // 确保所有子视图都可以交互 + [self enableInteractionForView:bannerView]; + + // 检查RoomHighValueGiftBannerAnimation是否有自己的手势识别器 + NSLog(@"🔧 RoomHighValueGiftBannerAnimation手势识别器数量: %ld", (long)bannerView.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in bannerView.gestureRecognizers) { + NSLog(@"🔧 RoomHighValueGiftBannerAnimation手势: %@ (enabled: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否"); + } + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (RoomHighValueGiftBannerAnimation)"); + } + } + } else if ([bannerClassName containsString:@"BravoGiftBannerView"]) { + NSLog(@"🔧 BravoGiftBannerView: 确保交互启用"); + // 确保所有子视图都可以交互 + [self enableInteractionForView:bannerView]; + + // 检查BravoGiftBannerView是否有自己的手势识别器 + NSLog(@"🔧 BravoGiftBannerView手势识别器数量: %ld", (long)bannerView.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in bannerView.gestureRecognizers) { + NSLog(@"🔧 BravoGiftBannerView手势: %@ (enabled: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否"); + } + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (BravoGiftBannerView)"); + } + } + } else if ([bannerClassName containsString:@"LuckyPackageBannerView"]) { + NSLog(@"🔧 LuckyPackageBannerView: 确保交互启用"); + // 确保所有子视图都可以交互 + [self enableInteractionForView:bannerView]; + + // 检查LuckyPackageBannerView是否有自己的手势识别器 + NSLog(@"🔧 LuckyPackageBannerView手势识别器数量: %ld", (long)bannerView.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in bannerView.gestureRecognizers) { + NSLog(@"🔧 LuckyPackageBannerView手势: %@ (enabled: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否"); + } + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (LuckyPackageBannerView)"); + } + } + } else if ([bannerClassName containsString:@"CPGiftBanner"]) { + NSLog(@"🔧 CPGiftBanner: 确保交互启用"); + // 确保所有子视图都可以交互 + [self enableInteractionForView:bannerView]; + + // 检查CPGiftBanner是否有自己的手势识别器 + NSLog(@"🔧 CPGiftBanner手势识别器数量: %ld", (long)bannerView.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in bannerView.gestureRecognizers) { + NSLog(@"🔧 CPGiftBanner手势: %@ (enabled: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否"); + } + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (CPGiftBanner)"); + } + } + } else { + // 默认处理:确保所有banner都能响应手势 + NSLog(@"🔧 默认Banner处理: %@", bannerClassName); + [self enableInteractionForView:bannerView]; + + // 确保Pan手势优先于按钮点击 + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + if ([gesture isKindOfClass:[UIPanGestureRecognizer class]]) { + gesture.cancelsTouchesInView = YES; + NSLog(@"🔧 设置Pan手势cancelsTouchesInView = YES (默认处理)"); + } + } + } +} + +- (void)enableInteractionForView:(UIView *)view { + view.userInteractionEnabled = YES; + + for (UIView *subview in view.subviews) { + subview.userInteractionEnabled = YES; + [self enableInteractionForView:subview]; + } +} + +#pragma mark - Legacy Support + - (void)setupCar { _carEffectQueue = [NSMutableArray array]; } @@ -588,6 +1295,16 @@ XPRoomGraffitiGiftAnimationViewDelegate @kStrongify(self); [self.hostDelegate exitRoom]; }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"BravoGiftBannerView"]) { + [self configureBannerInteraction:subview]; + break; + } + } + }); } - (void)playLuckyPackageBanner:(AttachmentModel *)obj { @@ -610,6 +1327,16 @@ XPRoomGraffitiGiftAnimationViewDelegate @kStrongify(self); [self.hostDelegate exitRoom]; }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"LuckyPackageBannerView"]) { + [self configureBannerInteraction:subview]; + break; + } + } + }); } - (void)receiveRoomGiftBanner:(AttachmentModel *)obj { @@ -631,6 +1358,16 @@ XPRoomGraffitiGiftAnimationViewDelegate self.isRoomBannerV2Displaying = NO; [self processNextRoomEffectAttachment]; }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"RoomHighValueGiftBannerAnimation"]) { + [self configureBannerInteraction:subview]; + break; + } + } + }); } - (void)receiveCPEvent:(AttachmentModel *)attachment { @@ -657,6 +1394,16 @@ XPRoomGraffitiGiftAnimationViewDelegate self.isRoomBannerV2Displaying = NO; [self processNextRoomEffectAttachment]; }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"CPGiftBanner"]) { + [self configureBannerInteraction:subview]; + break; + } + } + }); } - (void)playCPLevelUp:(AttachmentModel *)attachMent { @@ -827,6 +1574,16 @@ XPRoomGraffitiGiftAnimationViewDelegate @kStrongify(self); [self.hostDelegate exitRoom]; }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"LuckyGiftWinningBannerView"]) { + [self configureBannerInteraction:subview]; + break; + } + } + }); } -(void)receiveRoomGeneralFloatingScreen:(AttachmentModel *)attachment{ @@ -884,6 +1641,26 @@ XPRoomGraffitiGiftAnimationViewDelegate } } }]; + + // 延迟配置Banner交互,确保Banner已添加到视图层级 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + for (UIView *subview in self.bannerContainer.subviews) { + if ([NSStringFromClass([subview class]) containsString:@"GameUniversalBannerView"]) { + [self configureBannerInteraction:subview]; + + // 验证bannerContainer的手势识别器 + NSLog(@"🔧 Banner显示后验证:"); + NSLog(@" - bannerContainer手势数量: %ld", (long)self.bannerContainer.gestureRecognizers.count); + for (UIGestureRecognizer *gesture in self.bannerContainer.gestureRecognizers) { + NSLog(@" - 手势: %@ (enabled: %@, delegate: %@)", + NSStringFromClass([gesture class]), + gesture.enabled ? @"是" : @"否", + gesture.delegate ? @"已设置" : @"未设置"); + } + break; + } + } + }); } #pragma mark - Method: Car diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomHighValueGiftBannerAnimation.m b/YuMi/Modules/YMRoom/View/AnimationView/RoomHighValueGiftBannerAnimation.m index f3366279..74470234 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomHighValueGiftBannerAnimation.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomHighValueGiftBannerAnimation.m @@ -410,7 +410,8 @@ if ([self.goButton pointInside:goButtonPoint withEvent:event]) { return self.goButton; } - return nil; + // 其他区域返回self,允许触摸事件被父视图的手势识别器处理 + return self; } @end diff --git a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.h b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.h index 7b8de47f..395ebf8b 100644 --- a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.h +++ b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.h @@ -31,6 +31,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)showMusicPanel; +// 处理主动传递的点击事件 +- (void)onlineTapRecognizer; +- (void)tapFansTeamRecognizer; +- (void)contributionButtonAction:(UITapGestureRecognizer *)tap; +- (void)onAnchorHourRankButtonAction:(UITapGestureRecognizer *)ges; + @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/MSRoomOnLineView/MSRoomOnLineView.m b/YuMi/Modules/YMRoom/View/MSRoomOnLineView/MSRoomOnLineView.m index ab88b4f9..78e67638 100644 --- a/YuMi/Modules/YMRoom/View/MSRoomOnLineView/MSRoomOnLineView.m +++ b/YuMi/Modules/YMRoom/View/MSRoomOnLineView/MSRoomOnLineView.m @@ -117,9 +117,7 @@ imageView3.isHiddenSubView = NO; XPMessageRemoteExtModel *model3 = _avatarList[2]; imageView3.model = model3; - } - } #pragma mark - 懒加载 - (UIView *)countBgView{ diff --git a/YuMi/Modules/YMRoom/View/XPRoomViewController.m b/YuMi/Modules/YMRoom/View/XPRoomViewController.m index 7619bc60..dca28a73 100644 --- a/YuMi/Modules/YMRoom/View/XPRoomViewController.m +++ b/YuMi/Modules/YMRoom/View/XPRoomViewController.m @@ -138,7 +138,7 @@ XPCandyTreeInsufficientBalanceViewDelegate> @property (nonatomic,strong) XPRoomMenuContainerView *menuContainerView; ///活动 @property(nonatomic, strong) RoomSideMenu *sideMenu; -//@property (nonatomic,strong) XPRoomActivityContainerView *activityContainerView; + ///动画的view @property (nonatomic,strong) RoomAnimationView *animationView; ///功能view的的容器 diff --git a/YuMi/Network/HttpRequestHelper.m b/YuMi/Network/HttpRequestHelper.m index 1ea92e43..e676079a 100644 --- a/YuMi/Network/HttpRequestHelper.m +++ b/YuMi/Network/HttpRequestHelper.m @@ -52,9 +52,7 @@ return manager; } +(NSString *)getHostUrl{ -#if DEBUG -// return @"https://api.epartylive.com"; - +#if DEBUG NSString *isProduction = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsProductionEnvironment"]; if([isProduction isEqualToString:@"YES"]){ return API_HOST_URL;