Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone - prevent uiscrollview from scrolling by touch

I've a scrollview and on both sides, I've two buttons left and right.

when i click the scroll view will move left and when right button is clicked it will move right side. My scrollview has 20 buttons (approx) & on click of each button some action is performed.

Everything is perfectly implemented and working fine.

Only thing i couldn't implement is to prevent scrolling by touch. I don't want user to scroll the scrollview manually. How can i prevent it from scrolling by touch and still able to click the buttons inside the scrollview ?

like image 921
Satyam Avatar asked Feb 07 '11 17:02

Satyam


People also ask

How do you lock scroll on Iphone?

Go to Settings and tap Accessibility. Turn on the feature, then use the slider to select a sensitivity level.

How do I disable scroll in react native?

To enable or disable scrolling on FlatList with React Native, we can set the scrollEnabled prop. to set the scrollEnabled prop to false to disable scrolling on the FlatList.


1 Answers

Try setting yourScrollView.scrollEnabled = NO;. That should do exactly what you want.

like image 126
mrueg Avatar answered Sep 23 '22 05:09

mrueg