I added this code to perform a segue:
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"groupselection"];
[self.navigationController pushViewController:controller animated:YES];
I then gave the viewcontroller in the storyboard this id: groupselection
But the segue is not performed!! Any ideas?
yes, you do not push view controllers in storyboards so don’t use PushViewController.
You use
then you wire up the segue inside the storyboard by control dragging. Make sure you drag from the existing controller (the yellow circle below the controller with square inside it) to the new one, and then selecting what kind of segue you want (push, modal, replace)
then you will see a wire connecting the two controllers. Click on the middle circle, when the story is zoomed in all the way. In identity inspector on the right, give this seugue an identifier. That’s the name you will use in your code.