![](/img/trans.png)
[英]UICollectionview cellForItemAtIndexPath not getting called when reload in iOS 8
[英]UICollectionview cellForItemAtIndexPath not getting called when collectionview reload in performBatchUpdates
我必須為UICollectionview reloadData設置動畫,所以我在UICollectionView performBatchUpdates中調用了reloadData。
此動畫效果很好,但不幸的是,UICollectionviewcell子視圖(我的自定義視圖)在進行小時調試時並未更新,注意到cellForItemAtIndexPath沒有被調用為什么?
[UICollectionview performBatchUpdates:^{ [UICollectionview reloadData]; } completion:nil];
提前致謝
您可以向我們顯示更多有關如何設置子視圖的代碼嗎?
我想這可能對您有幫助:嘗試在layoutSubviews
設置子視圖,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.