刷新详情头部

This commit is contained in:
2025-12-19 15:40:39 +08:00
parent 182e5b9da1
commit c108077178

View File

@@ -342,11 +342,25 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
}
weakSelf.tags = tagNames.copy;
[weakSelf updateBottomBarAppearance];
[weakSelf.collectionView reloadData];
[weakSelf refreshHeaderAndTags];
});
}];
}
- (void)refreshHeaderAndTags {
if (!self.collectionView) { return; }
NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(KBSkinDetailSectionHeader, 2)];
[UIView performWithoutAnimation:^{
[self.collectionView reloadSections:sections];
[self.collectionView layoutIfNeeded ];
}];
NSIndexPath *headerIndexPath = [NSIndexPath indexPathForItem:0 inSection:KBSkinDetailSectionHeader];
KBSkinDetailHeaderCell *cell = (KBSkinDetailHeaderCell *)[self.collectionView cellForItemAtIndexPath:headerIndexPath];
if (cell) {
[cell configWithDetail:self.detailModel];
}
}
- (KBShopVM *)shopVM {
if (!_shopVM) {
_shopVM = [[KBShopVM alloc] init];