开发者

UITableview controls text are not loaded when goes visible off on scrolling

Im new to IPhone world. I have developed sample app using UITableviewcontroller + UIToolbar.

Problem is when cells goes visible off while scrolling that cell values are also cleared

for example: UITableview have the following items. (internally each item have some integer value for calculation)

Item1 text

Item2 text

Item3 text

Item4 text

Item4 text

Item5 text

When i scroll the tableview, item1 and item2 goes off from visible

Now i try to calculate tablevie开发者_开发问答w values, i missed the text of item1 and item2

Help me out of this

Thanks in advance, Nagarajan Govindarajan.


Only visible cell are kept in memory. You Should not use the cell to keep track of any values.

Use the UITableViewDataSource to keep track of any of the values. Use for instance a NSArray hold your itmes. Then in the methods of UITableViewDataSource you can retrieve the value from the NSArray and pass it to the UITableView which will display it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜