Describe the bug
The documentation of CollectionCoordinatorDelegate.coordinator(_:backgroundViewInCollectionView:) states:
Return a background view to be shown in the UICollectionView when its content is empty. Defaults to nil
This is wrong because the background view is set even when the collection view is not empty.
It also causes what I could class as a bug: whenever CollectionCoordinator.prepareSections() is called it will reset the background view, even when the delegate is nil.
To Reproduce
Use CollectionCoordinator
Expected behavior
- Do not reset
backgroundView when delegate is nil or the default implementation of CollectionCoordinatorDelegate.coordinator(_:backgroundViewInCollectionView:) is used
- Only show the background when the collection view is empty
Environment
- OS Version: Any
- Library Version: 1.x, 2.x
- Device: Any