UIScrollView不记得位置 [英] UIScrollView doesn't remember the position
问题描述
有没有人遇到过 UIScrollView
的问题,它被移动了[UIScrollView setContentOffset:...]
不记住它的新位置?但是,如果用户通过触摸和拖动滚动。
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.
症状:如果 UIScrollView
不记得新位置,它会翻转回到它最后记住的原始位置(这是通过触摸和拖动使用的位置)。
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.
有趣:
- 这只发生在4.0 和
未在3.1中发生 - 仅当
pagingEnabled == YES
为$ b时才会发生这种情况$ b set
- This only happens in 4.0 and didn't happen in 3.1
- This only happens if
pagingEnabled == YES
is set
推荐答案
原来, contentInsets
会混淆iOS 4.0中的 contentOffsets
...必须是SDK中的错误?
It turned out that the contentInsets
would confuse the contentOffsets
in iOS 4.0 ... must be a bug in the SDK?
这篇关于UIScrollView不记得位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!