3

I am wanting to create a modal segue from a view controller to an a new view, but not by linking the segue action to a button or anything. Instead, I'd like to just set the segue up so that I can call it in pageDidLoad and have it automatically execute if I want.

To do this, I need to be able to reference the segue, such as this:

[self performSegueWithIdentifier:@"mySegue" sender: ...];

After I control-click-drag a connection in storyboard to create a segue, how can I give it a name for later reference? Thanks!

jake9115
  • 3,824
  • 12
  • 44
  • 77

2 Answers2

6

Link the segue action from curent viewController to new view controller. I think this you want, see the screenshot.

enter image description here

This link will help you for remaining code.

Shardul
  • 4,256
  • 3
  • 31
  • 49
2

Nevermind! In the details pane sidebar of xcode, under the third tab there is an "Identifier" field that can be filled out!

jake9115
  • 3,824
  • 12
  • 44
  • 77