【发布时间】:2013-09-26 16:52:48
【问题描述】:
在我的应用程序中有一个使用 flowLayout 的 UICollectionView,它在 iOS 6 中运行良好,但在 iOS 7 中却严重失败。只要我转到包含我的 UICollectionView 的视图,就会发生以下情况:
*** Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:], /SourceCache/UIKit/UIKit-2903.2/UICollectionView.m:1401
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath
(UICollectionElementKindSectionHeader,<NSIndexPath: 0x145f3f50> {length = 2, path = 0 - 0}) was not retrieved by calling -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath: or is nil'
(<UICollectionReusableView: 0x145f9400; frame = (0 0; 320 20); layer = <CALayer: 0x145f90c0>>)
【问题讨论】:
标签: ios7 uicollectionview xcode5 uncaught-exception