Protocol

NSSeguePerforming

Implement the methods in the segue performing protocol to mediate a custom segue.

Overview

When you subclass NSStoryboardSegue to express a custom transition or containment relationship between storyboard scenes, you might also want to provide code that prepares the destination/contained view or window controller object. Put this code in an override of the prepare(for:sender:) method.

To conditionally disallow the performance of a segue, override the shouldPerformSegue(withIdentifier:sender:) method, returning false.

If you need to programmatically trigger a segue that cannot be expressed in a storyboard file, such as a transition between scenes in different storyboards, use the performSegue(withIdentifier:sender:) method in this protocol.

Symbols

Working with Storyboard Segues

func prepare(for: NSStoryboardSegue, sender: Any?)

Called when a segue is about to be performed.

func shouldPerformSegue(withIdentifier: String, sender: Any?)

Called immediately prior to the performance of a storyboard segue.

Relationships

Inherits From