Selected UItableViewCell staying blue when selected?

As the answers above point out, you need to explicitly deselect the row. You have two options as to how you do this. The first, is to deselect the row immediately after selection: (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ... tableView deselectRowAtIndexPath:indexPath animated:YES; } That will work just fine, but there is an alternative, and its the approach taken by UITableViewController which is to leave the row selected then deselect it when the view re-appears (after the controller you're pushing is popped off of the stack) This has the slight advantage that the user sees a glimpse of their previous selection when they return so they can see what they had selected previously To implement this, you just need to override viewDidAppear : (void)viewDidAppear:(BOOL)animated { super viewDidAppear:animated; self.

TableView deselectRowAtIndexPath:self. TableView indexPathForSelectedRow animated:YES; } As I said, this is what the default of implementation of UITableViewController s viewDidAppear: does so if you are using UITableViewController and not seeing this behaviour, you should check that you are calling the super implementation in your class' own viewDidAppear.

As the answers above point out, you need to explicitly deselect the row. You have two options as to how you do this. The first, is to deselect the row immediately after selection: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ... tableView deselectRowAtIndexPath:indexPath animated:YES; } That will work just fine, but there is an alternative, and its the approach taken by UITableViewController which is to leave the row selected then deselect it when the view re-appears (after the controller you're pushing is popped off of the stack).

This has the slight advantage that the user sees a glimpse of their previous selection when they return so they can see what they had selected previously. To implement this, you just need to override viewDidAppear: - (void)viewDidAppear:(BOOL)animated { super viewDidAppear:animated; self. TableView deselectRowAtIndexPath:self.

TableView indexPathForSelectedRow animated:YES; } As I said, this is what the default of implementation of UITableViewController's viewDidAppear: does so if you are using UITableViewController and not seeing this behaviour, you should check that you are calling the super implementation in your class' own viewDidAppear:.

You need to deselect it: tableView deselectRowAtIndexPath:indexPath animated:YES.

You just need to call tableView deselectRowAtIndexPath: indexPath animated: YES.

The default behaviour of UITableViewController deselects the row when the user returns from the detail view. The response given by Luke is fine, but I want to point out the reason for it: 1- If you have your UITableViewController like it was when you created it from scratch, you will have all the default behaviours. 2- If in the situation 1 you add a -viewWillAppear or -viewDidAppear, then you will be overwriting the standard behaviour.

Them, if you want that the row deselects on return, you must say the super explicitly that you'd like it to deselect the row by himself as it always did! To achieve this, as Luke says, you must call super viewWillAppear:animated or super viewDidAppear:animated like this: -(void)viewWillAppear:(BOOL)animated { super viewWillAppear:animated; // Here goes all of your stuff }.

Another solution is to call UITableView's reloadData in viewWillAppear.

Stackoverflow.com/.../selected-uitablevi... 10, 2010 – When I push a view after a user has selected a UITableView row, the ... As the answers above point out, you need to explicitly deselect the row. Stackoverflow.com/.../uitableviewcell-se... 18, 2009 – I would like to have a UITableViewCell stay lit (blue) after I call cell. Selected = yes.

Is this possible? Stackoverflow.com/.../why-does-uitablevi... 3, 2009 – I click the cell and can see it stays highlighted as a detail view is pushed. Stackoverflow.com/questions/.../iphone-u... 22, 2009 – in my UITableView sometimes cells stay selected after touching.

Stackoverflow.com/.../how-to-change-the-... 31, 2010 – I'm wondering how to change the blue highlight/selection color of a UITableViewCell , any ideas? Stackoverflow.com/.../selected-uibutton-... 13, 2010 – The cell changes color to blue (which is ok), uibutton changes its color to blue too. ... I want UIButton inside selected cell to stay, when I click it.

Stackoverflow.com/.../selected-uitablevi...0 17, 2011 – I have a UITableviewCell. ... How do I make the highlighted blue color persist so the user can visually ... save the indexpath of the selected cell ...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions