PDA

View Full Version : UITableView Grouped Style




XcodeNewb
Mar 9, 2009, 05:57 PM
I am having an issue with using a Grouped Style UITableView. I have 2 sections in my table with a variable number of rows in each section. The problem is that when a row in the first section rolls off of the screen and then is rolled back on the screen the data in the row is replaced with the data in the same row number of the 2nd section of the table.

The row data is obviously coming from the cellForRowAtIndexPath method. I have the row number in that method but I cannot figure out how to get the table section number. Is that possible? Or is there another way to do this? When the cell redraws it thinks it is in the second section of the table. That is causing the problem.

Thanks



dejo
Mar 9, 2009, 07:23 PM
indexPath contains a section and a row.

XcodeNewb
Mar 10, 2009, 01:49 PM
Thank you such much for the reply. How did I ever overlook that?