0
votes

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.

enter image description here

2
Is the tableView inside a UITableViewController? - danh
yes it is inside UITableViewController - Mahmoud Fayez
do you perform the segue in code, on the button's IBAction? - danh

2 Answers

2
votes

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];

} 
0
votes

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.