1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

UITableView Grouped Style

Discussion in 'iPhone/iPad Programming' started by XcodeNewb, Mar 9, 2009.

  1. macrumors member

    #1
    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
     
  2. Moderator

    dejo

    Staff Member

    #2
    indexPath contains a section and a row.
     
  3. macrumors member

    #3
    Thank you such much for the reply. How did I ever overlook that?
     

Share This Page