修复了房间内更多面板显示异常的问题
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user