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
I'd love to be able to update the collectionView's data on the go. I found this code does the job:
let range = Range(uncheckedBounds: (0, collectionView.numberOfSections))
let indexSet = IndexSet(integersIn: range)
collectionView.reloadSections(indexSet)
However, running this, makes the app crash at line 112 because of an unexpected nil:
I tried removing the ! to prevent the force-unwrapping of a nil variable, but that resulted in a generic terminating with uncaught exception of type NSException.
Any way we can update the data at runtime while viewing the collectionView?
I'm thinking of some cool animation: the cell that's to be removed scales down, then the cells below move up smoothly w/ a .easeOut curve. Would be awesome. Thanks!
The text was updated successfully, but these errors were encountered:
I'd love to be able to update the
collectionView
's data on the go. I found this code does the job:However, running this, makes the app crash at line 112 because of an
unexpected nil
:I tried removing the
!
to prevent the force-unwrapping of a nil variable, but that resulted in a genericterminating with uncaught exception of type NSException
.Any way we can update the data at runtime while viewing the
collectionView
?I'm thinking of some cool animation: the cell that's to be removed scales down, then the cells below move up smoothly w/ a
.easeOut
curve. Would be awesome. Thanks!The text was updated successfully, but these errors were encountered: