修改了礼物面板显示送礼物头像不明显的问题

This commit is contained in:
fengshuo
2022-03-08 10:50:00 +08:00
parent b4a8c7de2d
commit cd916efd0f
3 changed files with 40 additions and 12 deletions

View File

@@ -111,7 +111,7 @@
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(40 + 105 * 2 + 10 + 10);
make.height.mas_equalTo(40 + 108 * 2 + 10 + 10);
}];
@@ -124,7 +124,13 @@
[self.giftStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.segmentStackView.mas_bottom);
make.left.right.mas_equalTo(self);
make.height.mas_equalTo(105 * 2 + 20);
make.height.mas_equalTo(108 * 2 + 20);
}];
[self.giftcollectionView
mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(108 * 2 + 10);
}];
[self.pageController mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -204,8 +210,8 @@
if (self.segmentType == GiftSegmentType_Pack && self.datasource.count == 0) {
return CGSizeMake(KScreenWidth, 105 * 2 + 10);
}
CGFloat itemWidth = (CGFloat)(KScreenWidth - 10 - 5 * 3) / (CGFloat)4;
return CGSizeMake(itemWidth, 105);
CGFloat itemWidth = (CGFloat)(KScreenWidth - 15 * 2 - 5 * 3) / (CGFloat)4;
return CGSizeMake(itemWidth, 108);
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
@@ -234,7 +240,6 @@
GiftInfoModel * giftInfo= [self.datasource objectAtIndex:indexPath.item];
[self dealSelectGift:giftInfo];
[self.giftcollectionView reloadData];
}
}
@@ -395,10 +400,9 @@
- (UICollectionView *)giftcollectionView{
if (!_giftcollectionView) {
XPGiftCollectionViewFlowLayout *layout = [[XPGiftCollectionViewFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
layout.minimumLineSpacing = 5;
layout.minimumInteritemSpacing = 10;
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 5);
layout.minimumInteritemSpacing = 5;
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
_giftcollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_giftcollectionView.dataSource = self;
_giftcollectionView.delegate = self;