I canβt tell you why you see the problem, but here are some tips to fix it:
According to the Apple HIG, the selection should not disappear until it returns from the view controller, just pushed onto the stack. If your controller is only a UITableViewController, it should automatically deselect after returning to the view. If not, add
- (void) viewWillAppear:(BOOL)animated { [tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:animated]; [super viewWillAppear:animated]; }
somewhere in the view controller.
If there are any lines that, when clicked, do not go into another view and actually do nothing when selected, they should not be selected, so you can override this in
- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
and return nil in cases where the row should not be selected.
Ed Marty May 22, '09 at 13:15 2009-05-22 13:15
source share