Reputation: 4084
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!
Upvotes: 3
Views: 7606
Reputation: 4274
Link the segue action from curent viewController to new view controller. I think this you want, see the screenshot.
This link will help you for remaining code.
Upvotes: 6
Reputation: 4084
Nevermind! In the details pane sidebar of xcode, under the third tab there is an "Identifier" field that can be filled out!
Upvotes: 2