UIScrollView doesn't remember the position
Asked Answered
K

1

3

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
Kudu answered 17/8, 2010 at 10:24 Comment(2)
doesn't ring a bell. Are you sure there is no other explanation? Are frames and bounds all correct and have you logged all setContentOffsets you may be doing?Willy
post some code please, as mvds suggests you can do something wrongDecry
K
1

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

Kudu answered 26/8, 2010 at 21:33 Comment(1)
Did you ever fix this problem?Crasis

© 2022 - 2024 — McMap. All rights reserved.