Reputation: 211
I am using CompositionalLayout for UICollectionView. Before iOS 15 working fine without warning. But in Xcode 13 and iOS 15 getting below warning while scrolling UICollectionView
[UICollectionViewRecursion] cv == 0x7fc7f418e000 Disabling recursion trigger logging
I am using diffrent type of custom cell and that custom cell using customview.
Here is my configuration for cell UICollectionView ->CustomUICollectionviewCell->CustomUIView(load by nib)
How to resolve this issue?
Thanks in advance.
Upvotes: 6
Views: 2640
Reputation: 2224
Today, I faced the same issue where, on any movement in the collectionView, the console was printing the same message, and my cells couldn't layout correctly. I fixed it by removing estimatedItemSize
from my layout, adding itemSize
, and reassigning the item size in the sizeForItemAt
method in the UICollectionViewDelegateFlowLayout
delegate. It worked well with no messages in the console.
private lazy var defaultLayout: UICollectionViewFlowLayout = {
let defaultLayout = UICollectionViewFlowLayout()
defaultLayout.scrollDirection = .vertical
// defaultLayout.estimatedItemSize = CGSize(width: view.frame.width, height: 240) // Removed
defaultLayout.itemSize = CGSize(width: view.frame.width, height: 240) // Added
defaultLayout.minimumLineSpacing = 10
return defaultLayout
}()
Upvotes: 0
Reputation: 1100
I found this issue on GitHub
for ChatLayout
which is discussing this:
https://github.com/ekazaev/ChatLayout/issues/23
And it shows is just an internal problem from Apple itself.
https://twitter.com/caughtinflux/status/1439276097464528896?s=21
Upvotes: 0
Reputation: 535889
I don't believe there's any real issue here. I get this message in an app that doesn't even use collection views. You should just ignore the message, which appears only in the Xcode console and probably only on a simulator.
Upvotes: 1