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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
Additionally, a UIScrollView will not scroll in (width / height) if the contentSize property is not greater than the frame property (in width / height)