1

I am using StoryBoards and am trying to overlay a View Controller's view on top of another View Controller's view so that the two are visible (the top one has a couple of transparent areas).

If I connect the two together with a modal Segue and then call [self performSegueWithIdentifier:@"showTutorial" sender:nil]; the source view is removed and the destination one is shown. No joy.

If I connect them with a push Segue, calling [self performSegueWithIdentifier:@"showTutorial" sender:nil]; doesn't bring up the new view. Embedding the source view controller in a Navigation Controller brings up the destination view, but also removes the source view. No joy.

Any suggestions?

Eric
  • 16,003
  • 15
  • 87
  • 139

1 Answers1

3

@Inafziger: I thought I would have been able to do that with a segue, but segues are not the way. Also, as I wanted to keep working with the Storyboard and avoid making a new nib file from scratch, here's what I did:

tutorialView = [self.storyboard instantiateViewControllerWithIdentifier:@"Tutorial"];

[self.view addSubview:tutorialView.view];

Then in the Storyboard, write "Tutorial" in the ViewController's Identifier field.

Eric
  • 16,003
  • 15
  • 87
  • 139