修复了房间内更多面板显示异常的问题

This commit is contained in:
fengshuo
2022-03-22 14:57:19 +08:00
parent 6d8ad2bafe
commit 3b792698f0

View File

@@ -31,6 +31,8 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
@property (nonatomic,strong) UIView * topView;
///
@property (nonatomic,strong) UICollectionView *collectionView;
///View
@property (nonatomic,strong) UIView * bottomView;
///
@property (nonatomic,strong) NSArray<XPRoomMoreItemModel *> *datasource;
///
@@ -67,6 +69,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
self.view.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.topView];
[self.view addSubview:self.collectionView];
[self.view addSubview:self.bottomView];
}
- (void)initSubViewConstraints {
@@ -76,8 +79,14 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
make.left.right.mas_equalTo(self.view);
make.height.mas_equalTo(0);
make.bottom.mas_equalTo(self.bottomView.mas_top);
}];
[self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.view);
make.height.mas_equalTo(kSafeAreaBottomHeight);
}];
}
@@ -269,6 +278,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
_collectionView.delegate = self;
_collectionView.backgroundColor = [UIColor blackColor];
_collectionView.alpha = 0.9;
_collectionView.scrollEnabled = NO;
[_collectionView registerClass:[XPRoomMoreMenuCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPRoomMoreMenuCollectionViewCell class])];
}
return _collectionView;
@@ -284,4 +294,13 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
return _topView;
}
- (UIView *)bottomView {
if (!_bottomView) {
_bottomView = [[UIView alloc] init];
_bottomView.backgroundColor = [UIColor blackColor];
_bottomView.alpha = 0.9;
}
return _bottomView;
}
@end