Well, as I say in the subject, my problem is that I'm selecting programmatically a cell on a tableview with the intention of perform, automatically, the associated segue. I have the code to do this on the viewWillAppear of the associated tableviewcontroller.
The result is that the cell is selected, but the segue is not performed. Do you know why?
By the moment I'm performing the segue programmatically on the viewWillAppear to solve the problem, but I'm curious about why the segue is not automatically performed if the cell is selected...
By the way. The segue must be ok because when I select the cell tapping it works properly.
More info: i'm working on a splitviewcontroller. Left side has the tableviewcontroller and the segue presents a viewcontroller on the right side
Thanks a lot!
Carlos
Related code:
- (void) viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// Si no hay ninguna fila seleccionada, seleccionaremos la primera
// Obtenemos la fila seleccionada
NSIndexPath *filaSeleccionadaPath = [self.tableView indexPathForSelectedRow];
// Si no hay ninguna fila seleccionada
if (!filaSeleccionadaPath)
{
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
}