UITableViewCell not holding its selected state

Discussion in 'iOS Programming' started by ramkumar83, Aug 6, 2009.

  1. ramkumar83 macrumors newbie

    Joined:
    Jun 25, 2009
    #1
    Hello,

    I have User Settings view and have a table to list the options.

    When the user taps on a cell, the option is selected.

    I am saving the option to the property list when the view disappears and till this it is working fine.

    But when the user comes to the screen again, i want to have the already selected option to be highlighted(selected);

    I tried setting cell.selected = TRUE and also [cell setSelected:YES animated:YES] but the cell is losing its selected state.

    I can see the cell getting selected and also deselected?

    How can i make a particular cell hold its selected state when the view loads?
     
  2. Troglodyte macrumors member

    Joined:
    Jul 2, 2009
    #2
    You're not supposed to use the selected state like that (I think it's specifically mentioned as a no no in Apple's HIGs). I'd use a checkmark instead.
     

Share This Page