-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When adding a section to a ComposedSectionProvider
in a viewDidLoad
after the CollectionCoordinator
has been set as the delegate but before the view has appeared the coordinator will fatalError
in elementsProvider(for:)
with error Fatal error: No UI configuration available for section 2
.
To Reproduce
- Checkout https://github.com/composed-swift/Composed-Demo/tree/ComposedSectionProvider-crash-example
- Uncomment https://github.com/composed-swift/Composed-Demo/blob/ComposedSectionProvider-crash-example/Composed-Demo/Collection/PeopleCollectionViewController.swift#L20
Expected behavior
Should not crash
Environment
- OS Version: iOS 13.5, iOS 14 beta 7
- Library Version: 1.0.2
- Device: iPhone 8 Simulator
Additional context
The crash is triggered by collectionView.performBatchUpdates
, but the closure is never executed so prepareSections
never gets a chance to be called.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working