You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2020. It is now read-only.
My app crashes when fetch request is empty and I have supplementary views (without supplementary views everything ok). I get:
index 0 beyond bounds for empty NSArray
Seems like the problem is in CollectionViewDataSourceProvider:
supplementaryViewAtIndexPath:{[unowned self](collectionView, kind, indexPath)->UICollectionReusableViewiniflet factory =self.supplementaryViewFactory {letitem=self.sections[indexPath.section].items[indexPath.row]letview= factory.supplementaryViewForItem(item, kind: kind, inCollectionView: collectionView, atIndexPath: indexPath)return factory.configureSupplementaryView(view, forItem:nil, kind: kind, inCollectionView: collectionView, atIndexPath: indexPath)}
// we must not return nil here, per the `UICollectionViewDataSource` docs
// however, this will never get called as it is the client's responsibilty
// supplementary views are hidden by returning `CGSizeZero`
// from `collectionView(_:layout:referenceSizeForHeaderInSection:)`
fatalError("Attempt to dequeue unknown or invalid supplementary view <\(kind)> "+"for collection view <\(collectionView)> at indexPath <\(indexPath)>")})
Hello,
My app crashes when fetch request is empty and I have supplementary views (without supplementary views everything ok). I get:
index 0 beyond bounds for empty NSArray
Seems like the problem is in CollectionViewDataSourceProvider:
Stacktrace: