views:

27

answers:

1

Hi people,

I've got another problem my my UITableView: I dynamically load "Questions" from a XML File and show them inside cells of my UITableView, where the user can also answer them. The Problem is: if you scroll down, and then scroll up again, the answers that you typed before, just disappear. I've also noticed that UITableView calls the method tableView:cellForRowAtIndexPath: again, and that is exacty my problem, cause this method loads the questions from the XML File again so that all the answers that the User has typed get lost.

How can I keep all the cells in memory, and stop doing lazy loading of the cells?

I would appreciate any suggestions.

Thanks!

A: 

Store and preserve retrieved data in an NSMutableArray and hook this up as a data source to the table view.

Alex Reynolds
I know this possibility already, but what I really want is to stop this lazy loading and not have to do this.
jcdmb
Parse all of the XML into an array before you present the table view.
Alex Reynolds
Your suggestion would solve my problem, but it is not an answer to my question: I want actually to stop lazy loading the view. Thx anyway!
jcdmb