bug修复

This commit is contained in:
liyuhua
2023-10-30 15:41:21 +08:00
parent aebc8c0af9
commit a3b6fda673
4 changed files with 67 additions and 10 deletions

View File

@@ -20,12 +20,64 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
#define KScreenWidth [[UIScreen mainScreen] bounds].size.width
#define KScreenHeight [[UIScreen mainScreen] bounds].size.height
#define statusbarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
// 状态栏高度
#define statusbarHeight \
({\
CGFloat height = 0.0;\
if (@available(iOS 11.0, *)) {\
UIEdgeInsets insets = [UIApplication sharedApplication].delegate.window.safeAreaInsets;\
height = insets.top;\
} else {\
height = 20.0;\
}\
height;\
})
#define kStatusBarHeight statusbarHeight
#define kSafeAreaBottomHeight (iPhoneXSeries ? 34 : 0)
#define kSafeAreaTopHeight (iPhoneXSeries ? 24 : 0)
#define kNavigationHeight (kStatusBarHeight + 44)
#define kTabBarHeight (iPhoneXSeries ? 49.0+34.0 : 49.0)
// 安全区域底部高度
#define kSafeAreaBottomHeight \
({\
CGFloat height = 0.0;\
if (@available(iOS 11.0, *)) {\
UIEdgeInsets insets = [UIApplication sharedApplication].delegate.window.safeAreaInsets;\
height = insets.bottom;\
}\
height;\
})
// 安全区域顶部高度
#define kSafeAreaTopHeight \
({\
CGFloat height = 0.0;\
if (@available(iOS 11.0, *)) {\
UIEdgeInsets insets = [UIApplication sharedApplication].delegate.window.safeAreaInsets;\
height = insets.top;\
}\
height;\
})
// 导航栏高度
#define kNavigationHeight \
({\
CGFloat height = 0.0;\
if (@available(iOS 11.0, *)) {\
UIEdgeInsets insets = [UIApplication sharedApplication].delegate.window.safeAreaInsets;\
height = insets.top > 0 ? 44.0 + insets.top : 44.0;\
} else {\
height = 64.0;\
}\
height;\
})
// 标签栏高度
#define kTabBarHeight \
({\
CGFloat height = 0.0;\
if (@available(iOS 11.0, *)) {\
UIEdgeInsets insets = [UIApplication sharedApplication].delegate.window.safeAreaInsets;\
height = insets.bottom > 0 ? 49.0 + insets.bottom : 49.0;\
} else {\
height = 49.0;\
}\
height;\
})
#define kScreenScale ((CGFloat)KScreenWidth / (CGFloat)375)
#define kScreenHeightScale ((CGFloat)KScreenHeight / (CGFloat)812)
#define kHalfScreenHeight KScreenHeight * 0.65

View File

@@ -57,6 +57,7 @@
- (void)didClickEnterRoom {
if(self.broadcastModel.roomTitle == nil)return;
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomGiftBroadcastView:enterRoom:roomName:)]) {
[self.delegate xPRoomGiftBroadcastView:self enterRoom:[NSString stringWithFormat:@"%ld", self.broadcastModel.roomUid] roomName:self.broadcastModel.roomTitle];
}

View File

@@ -996,8 +996,14 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
self.hasAnimationEffect = roomInfo.hasAnimationEffect;
self.roomInfo = roomInfo;
self.userInfo = userInfo;
//
[self.presenter getRedPacket:[NSString stringWithFormat:@"%ld", self.roomInfo.uid]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
[self.presenter getRedPacket:[NSString stringWithFormat:@"%ld", self.roomInfo.uid]];
});
//5
if ([self isKictOutLatest:roomInfo]) {
return;

View File

@@ -175,9 +175,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
});
}