Remembering state: content offset and table cell reuse.

Posted by Attacus on Stack Overflow See other posts from Stack Overflow or by Attacus
Published on 2010-05-16T06:09:40Z Indexed on 2010/05/16 6:20 UTC
Read the original article Hit count: 199

I have a tableview with cells that have a scrollview in them. The scrollview is paged, 2 pages to be exact, and is meant to be able to quickly compare two small blocks of text.

I'm trying to find a way to remember what the content offset of the scrollview is. Cell reuse is killing me.

I've tried resetting the offset in prepareForReuse or directly in the cellForRowAtIndexPath, but it seems to give me exactly what you'd expect: Randomly offset tablecells after reuse.

Anyone have any ideas?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c