Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling vertical scrolling in UIScrollView

There is an option in IB to uncheck vertical scrolling on a scrollview, but it doesnt seem to work.

How can the scrollview be set to only scroll horizontally, and not vertically in the code rather than IB?

like image 874
some_id Avatar asked Feb 23 '11 18:02

some_id


People also ask

How do I turn off vertical scrolling?

To hide the vertical scrollbar and prevent vertical scrolling, use overflow-y: hidden like so: HTML. CSS.

How do I enable horizontal scrolling in scrollView?

As we discussed, ScrollView can provide only vertical scrolling for the layout. In case, if we want to enable horizontal scrolling, then we need to use HorizontalScrollView in our application.

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

since iOS7:

first: the content size width must be equal to the width of your scrollview

second: in your initWithNibName:

self.automaticallyAdjustsScrollViewInsets = NO; 

That´s it.

like image 93
Mirko Brunner Avatar answered Sep 28 '22 11:09

Mirko Brunner