【发布时间】:2014-05-16 21:13:05
【问题描述】:
我正在使用 CollectionView 来显示数据。当用户按下某个按钮时,我正在刷新 CollectionViewCell 以反映如下更改:
[self.collectionView reloadItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
这可以很好地重新加载单元格,但它不会重新加载它的页脚视图。我实现了以下方法
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"FOOTER CALLED");
当我重新加载单元格时不会调用它。
如果我用 [self.collectionview reloadData] 重新加载整个集合视图,一切都可以工作,但这并不高效。
如何确保我的 UICollectionViewCell 在 indexPath 的页脚也被刷新?
【问题讨论】:
标签: ios layout uicollectionview uicollectionviewcell