当我垂直向下滚动时,scrollView Resets 是位置

The scrollView Resets is position when i scroll down vertically

当我尝试向下滚动内容时,它只是重置他的位置,我想 向下滚动并且位置保持在我想要的位置,有人可以帮助我知道我缺少什么吗?

scrollview

您似乎正在为滚动视图使用布局。除非设置 contentSize 或 intrinsicSize,否则 Scrollview 不会知道其内容大小。

这会产生弹性效果,让用户在抬起手指时可以窥视并 returns 到原始位置。

如果 le 是滚动视图中的最后一个元素,那么在你的 viewDidLoad 中添加

scrollView.contentSize=CGSizeMake(self.view.frame.size.width,le.frame.size.height+le.frame.orizin.y);