Consider a view with a button. We can drag a connection from this button to some other view controller, create a segue in IB and we are happy. What if I need a segue that is performed upon some event, say, network progress, and that is unrelated to any user actions? For now I’m placing a button, drag a segue from this button, hide the button, assign an identifier to a segue and somewhere in the code i perform this segue. However, I think that placing a dummy button is not a right way. Possibly I’m missing something using storyboards, could you please help me to understand this?
Share
Create your segue by ctrl dragging from your view controller to your next view.
Then to call your segue, call:
[self performSegueWithIdentifier: @"SegueToScene1" sender: self];Make sure you give your segue a name in the storyboard.