disable scrollview up only

Hi,

is there anyway I can disable scroll view pushing up. I tried locking scroll view if user tries to push up.

but it gets locked forever. I just want scroll view to pull down only.

 local phase = event.phase if ( event.direction == "up" ) then scrollView:setIsLocked( true ) elseif ( event.direction == "down" ) then scrollView:setIsLocked(false) end

I’ve attached a video to demonstrate.

Try to remove focus from scrollview.

If that doesn’t work you can always setup your own swipe listener.

Daniel

Thank you Daniel. No luck… still lock forever. I guess there are no options to disable pull up.

Hi David,

This should be possible if you expand on your initial concept. When the direction goes up, lock the scrollView, as you’ve done. But, also detect when the touch phase has ended and, when so, unlock the scrollView. That way, when the user tries to move it up, it’ll be locked, but on release, it will return to normal behavior.

Take care,

Brent

Try to remove focus from scrollview.

If that doesn’t work you can always setup your own swipe listener.

Daniel

Thank you Daniel. No luck… still lock forever. I guess there are no options to disable pull up.

Hi David,

This should be possible if you expand on your initial concept. When the direction goes up, lock the scrollView, as you’ve done. But, also detect when the touch phase has ended and, when so, unlock the scrollView. That way, when the user tries to move it up, it’ll be locked, but on release, it will return to normal behavior.

Take care,

Brent