Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c UICollectionViewLayout返回属性和单元格不';t更新_Objective C_Uicollectionview_Uicollectionviewlayout - Fatal编程技术网

Objective c UICollectionViewLayout返回属性和单元格不';t更新

Objective c UICollectionViewLayout返回属性和单元格不';t更新,objective-c,uicollectionview,uicollectionviewlayout,Objective C,Uicollectionview,Uicollectionviewlayout,我创建了一个自定义布局,在一些随机的地方,我得到了奇怪的行为。 这是我得到的日志: rectForindex是我对属性的计算,单元格是我的单元格实际所在的位置。 这发生在collectionview的重新加载数据之后,强制所有这些数据重新计算 2015-01-26 21:23:46.815[558:125567] rectForIndex 0: 10.000000 35.000000 300.000000 200.000000 2015-01-26 21:23:46.816[558:125567

我创建了一个自定义布局,在一些随机的地方,我得到了奇怪的行为。 这是我得到的日志: rectForindex是我对属性的计算,单元格是我的单元格实际所在的位置。 这发生在collectionview的重新加载数据之后,强制所有这些数据重新计算

2015-01-26 21:23:46.815[558:125567] rectForIndex 0: 10.000000 35.000000 300.000000 200.000000
2015-01-26 21:23:46.816[558:125567] rectForIndex 1: 17.000000 25.000000 286.000000 200.000000
2015-01-26 21:23:46.817[558:125567] cellForItemAtIndexPath 0: 539.970276 8.354366 320.059448 256.979950
2015-01-26 21:23:46.818[558:125567] cellForItemAtIndexPath 1: 17.000000 25.000000 286.000000 200.000000

您需要使布局与重新加载数据一起失效。