2

I have a scroll view, it scrolls my view. If I scroll far up or far down, it shows white space. I believe this is known as the rubber band effect or inertial scrolling. Is there a documented or allowed way I can disable this?

4

5 回答 5

7

将滚动条的反弹属性设置为 false/no。之后就不会反弹了。

self.scrollView.bounces = NO;

于 2012-09-03T11:26:46.380 回答
3

是的。在 interface-builder 或 Storyboards 中,只需选择 UIScrollView 并取消选中“bounces”属性。

在代码中:

self.scrollView.bounces = NO;
于 2012-09-03T11:25:35.803 回答
3

检查UIScrollView 反弹属性。它就像这种行为的开/关属性。

于 2012-09-03T11:26:16.843 回答
3

用这个:

self.scrollView.bounces = NO;
于 2012-09-03T11:23:46.843 回答
2
self.yourScrollView.bounces = NO;
于 2012-09-03T11:24:31.270 回答