UIScrollView doesn't remember the position

一曲冷凌霜 提交于 2019-12-22 09:28:15

问题


Has anyone ever had the problem that a UIScrollView, which gets moved by [UIScrollView setContentOffset:...] doesn't "remember" it's new position? It however does, if the user scrolls via touch-and-drag.

Symptoms: If the UIScrollView doesn't remember the new position, it "flips" back to the original position it last remembers (which is the position which has been used via touch-and-drag) whenever it's being touched.

Interesting:

  • This only happens in 4.0 and didn't happen in 3.1
  • This only happens if pagingEnabled == YES is set

回答1:


It turned out that the contentInsets would confuse the contentOffsets in iOS 4.0 ... must be a bug in the SDK?



来源:https://stackoverflow.com/questions/3501446/uiscrollview-doesnt-remember-the-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!