I have absolutely zero idea why this is happening, but for whatever reason a collection view I am using is infinitely looping the [UICollectionViewData layoutAttributesForElementsInRect:]
method.
The collection view is inside of my custom navigation bar. In one scenario where I use this custom navigation bar, everything works as expected. In another scenario, it loops infinitely.
collectionView
.0
for itemsInSection
.In regard to posting code, I am not sure exactly what to post. The infinite loop begins after [UIWindow makeKeyAndVisible]
is called. This method never returns. It was only after time profiling that I discovered that it was this [UICollectionViewData layoutAttributesForElementsInRect:]
that was causing the problem.
I had the same infinite loop problem inside [UICollectionViewData layoutAttributesForElementsInRect:]
when i was manually updating contentOffset to collectionView with no elements (i.e. when numberOfItemsInSection
was 0).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With