Anyone find a solution to this?
Post
Replies
Boosts
Views
Activity
Replacing .setContentOffset(...) with .scrollToTop(at: IndexPath(row: 0, section: 0), at: .top, animated: true) resolved error two.
If anyone can, please share more clarity as to why when I return from collectionView:viewForSupplementaryElementOfKind:atIndexPath: that my return ends up nil despite returning a valid view?
Update
Turns out that my workaround did not work. I AM receiving an object, the crash is verified happening at the UIKit level and not in my code. The code runs in iOS 14 and below, and when supplementary cells for type .background(...) are removed, the code works fine. This only appears to be for cells of type .background(...) (this code: https://developer.apple.com/documentation/uikit/nscollectionlayoutdecorationitem/3199051-background)
It is not viewForSupplementaryElementOfKind:atIndexPath: returning nil, it is an Objective-C layer returning nil per Xcode as this code works in iOS 14.x using Xcode 13.x