0

I am trying to create push segue from view. Maybe image would be best for describing: Storyboard of my application

I started from sample ECSlidingViewController project (BasicMenu) and I am trying to expand first ViewController (Home) to another ViewController. I get it and I can go from selected row in tableView to the controller. But when I am in controller and I tap on Back I am at different screen from first one (it's blank screen with button at upper left). I guess I must set something more to get this working but I don't know what. Thanks

Updated: Code from first view controller to go to next view controller:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Find the selected cell in the usual way
    UITableViewCell *cell = [self.searchResultsTableView cellForRowAtIndexPath:indexPath];

    [self performSegueWithIdentifier:@"selectedSegue" sender:cell];
}
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182
  • I added some lines of code but I am not sure what I should add more. I added second view controller. I add push segue from first controller from tableView to second view controller and I added lines of code which are at my question. – Libor Zapletal Feb 13 '14 at 14:20

1 Answers1

0

I found that the problem is with code in method didSelectRowAtIndexPath. When I removed it. The segue is performed well and I go to other view controller and when I tap on top left button I get back where I was. It's okay.

So I guess the real problem was with sender in performSegueWithIdentifier.

But I need send to new controller some information about selected row. So I used this answer.

Community
  • 1
  • 1
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182