Ahmed Refaat
Ahmed Refaat

Reputation: 63

Clear selection of TTTableViewController when view appears

I can't seem to find a way to clear a TTTableViewController's selected cell after returning from the previous view. Anyone got any advice?

Upvotes: 0

Views: 322

Answers (1)

audience
audience

Reputation: 2412

TTTableViewController is a subclass of UIViewController so you can use the @property(nonatomic) BOOL clearsSelectionOnViewWillAppear property and set is to TRUE

If this does not work you can always deselect the row with

[self.tableView deselectRowAtIndexPath:[self.view indexPathForSelectedRow] animated:YES];

where self.tableView is your TableView. Putting this line in your viewWillAppear should work.

Upvotes: 1

Related Questions