gpt4 book ai didi

ios - Collection View 完全加载后如何启动函数?

转载 作者:行者123 更新时间:2023-11-30 12:47:16 24 4
gpt4 key购买 nike

Collection View 完全加载后如何启动函数?

我使用覆盖func layoutSubviews()但它没有按照我想要的方式工作。

谢谢。

最佳答案

按照以下方式执行(obj - c)

- (void)collectionView:(UICollectionView *)collectionView 
willDisplayCell:(UICollectionViewCell *)cell
forItemAtIndexPath:(NSIndexPath *)indexPath{

if([indexPath row] == ((NSIndexPath*)[[collectionView indexPathsForVisibleRows] lastObject]).row){
//end of loading, now your collection view is fully loaded.
// Now call the method you wanted to call
}
}

关于ios - Collection View 完全加载后如何启动函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41484840/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com