Cells resize during interactive pop gesture when preservesSuperviewLayoutMargins = true

When using the interactive swipe gesture to back in a navigation controller, cells in a collection view resize during the transition. It does not happen when using the back button. This can lead to very strange glitches. Most of the time it looks like the leading side gets bigger and smaller when animating.

The trigger seems to be preservesSuperviewLayoutMargins = true.

Sample project: https://gist.github.com/nicoreese/32080748babee9d10cfd151d4ad94622

Video of the issue as seen in the Health app: https://mastodon.social/@nicoreese/117138839377696127

Filed under: FB24461877

There's a similar issue with UIStackViews: FB22340191

Looks like both issues were introduced with iOS 26. Does anyone know a fix for this. I suspect this won't get fixed very fast at the system level.

Cells resize during interactive pop gesture when preservesSuperviewLayoutMargins = true
 
 
Q