简体   繁体   English

调用referenceSizeForFooterInSection而不调用reloadData

[英]calling referenceSizeForFooterInSection without calling reloadData

Is there a way so that I can make UICollectionView to reload the footer section, ie: call referenceSizeForFooterInSection of the UICollectionView without actually calling reloadData as a whole? 有没有一种方法可以使UICollectionView重新加载页脚部分,即:调用UICollectionView的referenceSizeForFooterInSection,而无需实际整体调用reloadData?

In my referenceSizeForFooterInSection i have a flag that determines what the height of the footer view is. 在我的referenceSizeForFooterInSection中,我有一个标志来确定页脚视图的高度。

hack可能是在末尾放置一个空白部分,并使用reloadSections仅加载最后一个将重新填充页脚的部分。

UICollectionViewLayout上调用invalidateLayout将强制重新计算并调整其元素的大小

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM