刷新详情头部
This commit is contained in:
@@ -342,11 +342,25 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
|
|||||||
}
|
}
|
||||||
weakSelf.tags = tagNames.copy;
|
weakSelf.tags = tagNames.copy;
|
||||||
[weakSelf updateBottomBarAppearance];
|
[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 {
|
- (KBShopVM *)shopVM {
|
||||||
if (!_shopVM) {
|
if (!_shopVM) {
|
||||||
_shopVM = [[KBShopVM alloc] init];
|
_shopVM = [[KBShopVM alloc] init];
|
||||||
|
|||||||
Reference in New Issue
Block a user