Trong ứng dụng của tôi có UICollectionView sử dụng flowLayout và nó hoạt động tốt trong iOS 6 nhưng thất bại khủng khiếp trong iOS 7. Ngay sau khi tôi phân biệt chế độ xem chứa UICollectionView của tôi, đây là những gì xảy ra:UICollectionView + iOS 7/Xcode 5 = Xác nhận thất bại
*** 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>>)
Câu trả lời hoàn hảo @ZaBlanc, cảm ơn bạn! Bất kỳ ý tưởng gì đã thay đổi từ iOS 6 đến 7? [The iOS 7 API Diffs] (https://t.co/vuiz2TaU3r) không hiển thị bất cứ điều gì ngoài việc thêm vào UICollectionView –