I have a custom UITableViewController showing a TableView with a list of locations, I created a segue in the storyboard (ios 5) and gave it an Identifier “SelectPlace”, it’s coming out of a cell in the first UITableViewController and is supposed to segue to the next UITableViewController showing a new tableview with a list of details of the location chosen.
Problem is the segue does not perform (next TableViewController is not pushed into screen, current one stays on) even though I double checked for the correct identifier and set everything in place.
I even see (breakpoints) the -prepareForSegue happening and completing successfully.
I also tried adding
[self performSegueWithIdentifier:@"SelectPlace" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
to the cell selection
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
but it did not help (and I don’t think it’s neccasary because the segue is drawn on the storyboard)
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog([segue.identifier description]);
if ([segue.identifier isEqualToString:@"SelectPlace"])
{
NSArray* placePhotosArr = [FlickrFetcher photosInPlace:[self.topPlacesArray objectAtIndex:([self.tableView indexPathForCell:sender].row)] maxResults:50];
[segue.destinationViewController setPlacePhotosArray:placePhotosArr];
//[segue perform];
NSLog([placePhotosArr description]);
}
}
what’s missing???
please help
My bad, the reason the segue was not pushing was because I forgot to ’embed’ the tableviewcontroller in a navigation viewcontroller… duh