I’m having a weird UIKit problem. I have a bunch of views in a UIScrollView
and I add a UIContextMenuInteraction
to all of them when the view is first loaded. Because they're in a scroll view, only some of the views are initially visible.
The interaction works great for any of the views that are initially on-screen, but if I scroll to reveal new subviews, the context menu interaction has no effect for those.
I used Xcode's View Debugger to confirm that my interaction is still saved in the view's interactions
property, even for views that were initially off-screen and were then scrolled in.
What could be happening here?