全服送礼物 飘屏无法点击的问题

This commit is contained in:
fengshuo
2021-11-22 16:00:54 +08:00
committed by zu
parent 186d4833df
commit 720e2cb1df
5 changed files with 63 additions and 13 deletions

View File

@@ -247,6 +247,7 @@
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D526FDE01B00A777FE /* XPMineRechargePresenter.m */; };
E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */; };
E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846DB26FDE24300A777FE /* RechargeListModel.m */; };
E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */; };
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8CEA03C26EA3DE500644B44 /* LoginPasswordPresent.m */; };
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7626F2F15100F03460 /* XPMineViewController.m */; };
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7926F2F16600F03460 /* XPMinePresent.m */; };
@@ -749,6 +750,8 @@
E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeProtocol.h; sourceTree = "<group>"; };
E8B846DA26FDE24300A777FE /* RechargeListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RechargeListModel.h; sourceTree = "<group>"; };
E8B846DB26FDE24300A777FE /* RechargeListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RechargeListModel.m; sourceTree = "<group>"; };
E8C214FF274B76F60079E6BF /* XPRoomAnimationHitView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomAnimationHitView.h; sourceTree = "<group>"; };
E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomAnimationHitView.m; sourceTree = "<group>"; };
E8CEA03B26EA3DE500644B44 /* LoginPasswordPresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPasswordPresent.h; sourceTree = "<group>"; };
E8CEA03C26EA3DE500644B44 /* LoginPasswordPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginPasswordPresent.m; sourceTree = "<group>"; };
E8CEA03E26EA3E0200644B44 /* LoginPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPasswordProtocol.h; sourceTree = "<group>"; };
@@ -1917,6 +1920,8 @@
E83DB47E274649B200D8CBD1 /* Model */,
E8AEAEEB27141AE20017FCE0 /* XPRoomBackContainerView.h */,
E8AEAEEC27141AE20017FCE0 /* XPRoomBackContainerView.m */,
E8C214FF274B76F60079E6BF /* XPRoomAnimationHitView.h */,
E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */,
E83DB47B2746372300D8CBD1 /* XPRoomGiftBannerView.h */,
E83DB47C2746372300D8CBD1 /* XPRoomGiftBannerView.m */,
E83DB4822746661800D8CBD1 /* XPRoomGiftBroadcastView.h */,
@@ -2439,6 +2444,7 @@
E8AC722726F482A4007D6E91 /* XPMineFeedbackPresenter.m in Sources */,
186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */,
18A61BD7274F7F6900A09A54 /* NetImageConfig.m in Sources */,
E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */,
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */,

View File

@@ -0,0 +1,16 @@
//
// XPRoomAnimationBaseView.h
// xplan-ios
//
// Created by 冯硕 on 2021/11/22.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomAnimationHitView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,25 @@
//
// XPRoomAnimationBaseView.m
// xplan-ios
//
// Created by on 2021/11/22.
//
#import "XPRoomAnimationHitView.h"
@implementation XPRoomAnimationHitView
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) {
UIView * subView = [self.subviews objectAtIndex:i];
CGPoint convertPoint = [subView convertPoint:point fromView:self];
if (CGRectContainsPoint(self.bounds, convertPoint)) {
return [subView hitTest:convertPoint withEvent:event];
}
}
return nil;
}
@end

View File

@@ -29,15 +29,16 @@
///View
#import "XPRoomGiftBannerView.h"
#import "XPRoomGiftBroadcastView.h"
#import "XPRoomAnimationHitView.h"
@interface XPRoomBackContainerView ()<SVGAPlayerDelegate, NIMChatManagerDelegate,NIMBroadcastManagerDelegate, XPRoomGiftBroadcastViewDelegate>
///
///
@property (nonatomic,strong) UIView * lowLevelView;
@property (nonatomic,strong) XPRoomAnimationHitView * lowLevelView;
///
@property (nonatomic,strong) UIView * middleLevelView;
@property (nonatomic,strong) XPRoomAnimationHitView * middleLevelView;
///
@property (nonatomic,strong) UIView * highLevleView;
@property (nonatomic,strong) XPRoomAnimationHitView * highLevleView;
///
@property (strong, nonatomic) SVGAParser *parser;
///
@@ -210,6 +211,7 @@
}
}
}];
[view pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
}
@@ -220,6 +222,7 @@
- (void)xPRoomGiftBroadcastView:(XPRoomGiftBroadcastView *)view didClickClose:(XPRoomGiftBroadCastModel *)broadcastModel {
[view removeFromSuperview];
[view pop_removeAllAnimations];
if ([self.giftBroadcastQueue containsObject:broadcastModel]) {
[self.giftBroadcastQueue removeObject:broadcastModel];
}
@@ -598,31 +601,31 @@
return _bannerVisiablePool;
}
- (UIView *)lowLevelView {
- (XPRoomAnimationHitView *)lowLevelView {
if (!_lowLevelView) {
_lowLevelView = [[UIView alloc] init];
_lowLevelView = [[XPRoomAnimationHitView alloc] init];
_lowLevelView.backgroundColor = [UIColor clearColor];
_lowLevelView.userInteractionEnabled = NO;
_lowLevelView.userInteractionEnabled = YES;
_lowLevelView.tag = 1000;
}
return _lowLevelView;
}
- (UIView *)middleLevelView {
- (XPRoomAnimationHitView *)middleLevelView {
if (!_middleLevelView) {
_middleLevelView = [[UIView alloc] init];
_middleLevelView = [[XPRoomAnimationHitView alloc] init];
_middleLevelView.backgroundColor = [UIColor clearColor];
_middleLevelView.userInteractionEnabled = NO;
_middleLevelView.userInteractionEnabled = YES;
_middleLevelView.tag = 2000;
}
return _middleLevelView;
}
- (UIView *)highLevleView {
- (XPRoomAnimationHitView *)highLevleView {
if (!_highLevleView) {
_highLevleView = [[UIView alloc] init];
_highLevleView = [[XPRoomAnimationHitView alloc] init];
_highLevleView.backgroundColor = [UIColor clearColor];
_highLevleView.userInteractionEnabled = NO;
_highLevleView.userInteractionEnabled = YES;
_highLevleView.tag = 3000;
}
return _highLevleView;

View File

@@ -77,7 +77,7 @@
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.userInteractionEnabled = YES;
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 50 * kScreenScale/2;
_avatarImageView.layer.cornerRadius = 44 * kScreenScale/2;
}
return _avatarImageView;
}