Disable "manual" scrolling and only use scrollTo in scrollView.

You must Login before you can answer or comment on any questions.

Hello,

I am developing an iOS app and in this I am trying to make navigation based on vertical and horizontal scrolling.

I am using scrollable views for horizontal scrolling and a normal scrollview for vertical scrolling.

What I am trying to do is that the user cannot manually swipe up and down to scroll but need to click on a button that does a scrollTo movement. How can I disable "manual" scrolling and only use the up and down buttons? I think I need to do this to be able to have a table too.

Thankful for all input!

— asked 2 years ago by James -
0 Comments

1 Answer

If you can't find a way to trap the swipe events on your scrollView, you could try to overlay a fullscreen transparent view over the whole thing which would prevent any clicks getting to it. It all depends what you need to do really.

— answered 2 years ago by Kosso .
answer permalink
3 Comments
  • The reason that I would like to disable "manual" scrolling is that I need to use scrollable tables inside the view.

    — commented 2 years ago by James -

  • try setting touchEnabled:false when you create it.

    — commented 2 years ago by Kosso .

  • If I use touchEnabled:false the elements in that view is also unclickable unfortunately.

    — commented 2 years ago by James -

Your Answer

Think you can help? Login to answer this question!