小时榜飘屏点击【去围观】没有跳转到对应房间

This commit is contained in:
fengshuo
2022-06-16 16:35:52 +08:00
parent c17342d823
commit 13a1520cd2
2 changed files with 14 additions and 7 deletions

View File

@@ -51,7 +51,7 @@
#import "XPRoomLicneseHourRankView.h"
#import "XPRoomLuckyBigPrizeView.h"
@interface XPRoomAnimationView ()<SVGAPlayerDelegate,NIMBroadcastManagerDelegate, XPRoomGiftBroadcastViewDelegate, HWDMP4PlayDelegate, XPRoomLuckyBigPrizeViewDelegate>
@interface XPRoomAnimationView ()<SVGAPlayerDelegate,NIMBroadcastManagerDelegate, XPRoomGiftBroadcastViewDelegate, HWDMP4PlayDelegate, XPRoomLuckyBigPrizeViewDelegate,XPRoomLicneseHourRankViewDelegate>
///
///
@property (nonatomic,strong) XPRoomAnimationHitView * lowLevelView;
@@ -612,9 +612,8 @@
#pragma mark -
- (void)receiveLicneseHourRank:(AttachmentModel *)attachment {
XPRoomLicneseHourRankView *anchorRankView = [[XPRoomLicneseHourRankView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight + 15, 375, 60)];
anchorRankView.delegate = self;
anchorRankView.licneseRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoTopRankLicneseRoom:)];
[anchorRankView addGestureRecognizer:tap];
[self.highLevleView addSubview:anchorRankView];
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
springAnimation.springSpeed = 12;
@@ -639,12 +638,11 @@
[anchorRankView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
}
- (void)gotoTopRankLicneseRoom:(UITapGestureRecognizer *)tap {
XPRoomLicneseHourRankView * view = (XPRoomLicneseHourRankView *)tap.view;
if (view.licneseRankInfo > 0) {
- (void)xPRoomLicneseHourRankView:(XPRoomLicneseHourRankView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo {
if (rankInfo.uid.integerValue > 0) {
[self.delegate exitRoom];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[XPRoomViewController openRoom:view.licneseRankInfo.uid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
[XPRoomViewController openRoom:rankInfo.uid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
});
}
}

View File

@@ -61,6 +61,13 @@
}];
}
#pragma mark - Event Response
- (void)backTapRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomLicneseHourRankView:rankInfo:)]) {
[self.delegate xPRoomLicneseHourRankView:self rankInfo:self.licneseRankInfo];
}
}
#pragma mark - Getters And Setters
- (void)setLicneseRankInfo:(RoomHalfHourRankModel *)licneseRankInfo {
_licneseRankInfo = licneseRankInfo;
@@ -91,6 +98,8 @@
_backImageView = [[UIImageView alloc] init];
_backImageView.userInteractionEnabled = YES;
_backImageView.image = [UIImage imageNamed:@"room_licnese_hour_rank_bg"];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backTapRecognizer)];
[_backImageView addGestureRecognizer:tap];
}
return _backImageView;
}