Reputation: 3459
When the user click on the disclosure button I perform a segue that push a new view
controller to the current navigation controller. the problem is when I pop the pushed
controller to get to the UITableView I found that the disclosure button is still in dark
blue!!! see attached image.
Upvotes: 0
Views: 155
Reputation: 49730
have you tryig with this, hope it will helps you.
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
Upvotes: 2
Reputation: 11436
That's because the cell is selected. The selected state is not cleared by default. Add to viewWillAppear
method:
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
depending on what you named your tableView property.
Upvotes: 0