iphone - UITableCell - How do I turn off the selected state of the cell when user navigates back to view? -
I think this is a very common situation, but I do not know that everyone resolves the problem.
I have a UITableView, and when a user taps the cell, I push a new view controller (using UINavigationController) on the stack. When the user taps the "back" on the navigation bar, the cell still appears in the chosen state (i.e. blue background).
I should start the background, when the user tapped the cell, but when the page is shown again, turn off.
You can unselect the cell before or after pushing the new view controller.
- (zero) tableview: (UITableView *) had aTableView SelectionRowAtIndexPath: (NSIndexPath *) Indexing Path {[deselect aTableView RowAtIndexPath: indexPath Animated: Yes]; // Create and push new view controller
Comments
Post a Comment