How can I make three20 remember my scroll position in a table view?
In 开发者_如何学Cthree20, when I open a table view, scroll down a bit, click the back button, and then go back into that same table view, three20 does not seem to automatically remember my scroll position. It puts the scroll back at the top.
How can I make three20 remember where I was? I'm assuming it destroys the view controller once I leave it. Is there a way to prevent this?
I have no clue how three20 works. But the basic idea with UISrollView would be to just store the scroll point in a variable and then when the view is reloaded set the scroll point.
contentOffset
setContentOffset:
It seems like this is just part of the way three20 functions. The only way to make this work is to override the dealloc
method and save the scroll position at that time. Then, when reinitializing it, load that saved information and go from there.
精彩评论