On iOS18 beta1 & beta2 builds, calling
collectionView.cancelInteractiveTransition()
after a call to
startInteractiveTransition(to:completion:)
seems to remove the intermediate transition layout object from the collection view, but doesn't reinstalls the original layout, which results in the collection view disappearing completely.
This was not the case in previous iOS versions, so maybe a beta bug?
Possibly related, Xcode logs the following error in the console in the exact moment when the collectionView disappears:
“Requesting visual style in an implementation that has disabled it, returning nil. Behavior of caller is undefined.”
I filled a bug report, together with sample project, just in case FB14057335
Thanks!