0

我有一个 UICollectionView,而单元被重用,然后崩溃。下面是崩溃时的堆栈。

0 libobjc.A.dylib objc_msgSend + 32

1 UIKitCore - [UIView(动画)_removeAllAnimations:] + 100

2 UIKitCore-[UIView(动画)_removeAllAnimations:] + 244

3 UIKitCore - [UIView(动画)_removeAllAnimations:] + 244

4 UIKitCore - [UIView(动画)_removeAllAnimations:] + 244

5 UIKitCore-[UIView(动画)_removeAllAnimations:] + 244

6 UIKitCore-[UIView(动画)_removeAllAnimations:] + 244

7 UIKitCore - [UIView(动画)_removeAllAnimations:] + 244

8 UIKitCore-[UICollectionViewCell prepareForReuse] + 228

9 UIKitCore-[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:] + 400

10 UIKitCore-[UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] + 104

11 myapp -[myCollectionView 集合视图:cellForItemAtIndexPath:]

你能帮助我吗?我真的不明白为什么会在这里崩溃。

4

1 回答 1

0

检查您的单元格标识符。确保它需要与情节提要中的设置相同。

按照下面的屏幕截图。 在此处输入图像描述 在此处输入图像描述

于 2022-01-17T04:39:25.210 回答