tags:

views:

109

answers:

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?

+1  A: 

In the Human Interface Guidelines, Apple recommends that you don't use "selected" for representing state, and use an accessory view instead.

I ignored this at first, but then noticed that use of selected has somewhat unpredictable results from 2.2.1 to 3.0 (behavior changed without me changing any code), so I went with their recommendation.

bpapa