Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force uiscrollview to bounce scrolling even with a single item

I have a UIScrollView with varying numbers of items/subviews. When there is more than one item, scrolling bounce works. However, there are times when the scrollview should only have one item, and I would like to provide the feedback to the user that their scrolls are being recognized--thus the bounce effect. However, UIScrollView disables scrolling with just one item.

like image 520
akaru Avatar asked Feb 16 '11 19:02

akaru


Video Answer


1 Answers

Answer: set alwaysBounceHorizontal or alwaysBounceVertical to true. I answered my own question while writing this up and figured I might as well post it to help others.

like image 191
akaru Avatar answered Oct 21 '22 11:10

akaru