UILookToScrollInteraction Versus UIScrollView.lookToScrollAxes

How does using the new +[UILookToScrollInteraction exclusionRegionInteraction]differ from setting a UIScrollView's lookToScrollAxes to an empty option set?

Is UILookToScrollInteraction designed to be applied to scroll edge element containers?

Answered by Frameworks Engineer in 892362022

Setting lookToScrollAxes to an empty option set disables Look to Scroll for the entire scroll view, whereas +[UILookToScrollInteraction exclusionRegionInteraction] suppresses scrolling only within the specific region occupied by the view it is attached to. The exclusion region interaction is designed for any view occupying a scroll edge region where triggering a scroll would be disruptive.

Accepted Answer

Setting lookToScrollAxes to an empty option set disables Look to Scroll for the entire scroll view, whereas +[UILookToScrollInteraction exclusionRegionInteraction] suppresses scrolling only within the specific region occupied by the view it is attached to. The exclusion region interaction is designed for any view occupying a scroll edge region where triggering a scroll would be disruptive.

UILookToScrollInteraction Versus UIScrollView.lookToScrollAxes
 
 
Q