Type Method

segueWithIdentifier:source:destination:performHandler:

Creates a storyboard segue and a block used when the segue is performed.

Declaration

+ (instancetype)segueWithIdentifier:(NSStoryboardSegueIdentifier)identifier source:(id)sourceController destination:(id)destinationController performHandler:(void (^)(void))performHandler;

Parameters

identifier

The unique identifier for the storyboard segue. See the identifier property.

sourceController

The starting/containing view controller or window controller for the storyboard segue.

destinationController

The ending/contained view controller or window controller for the storyboard segue.

performHandler

A block of code that you provide, to be run each time the system calls the perform method.

Return Value

An initialized storyboard segue and code block, ready to be performed.

Discussion

You can use this method to customize a storyboard segue in lieu of creating a subclass.

See Also

Customizing Storyboard Segue Initialization and Invocation

- initWithIdentifier:source:destination:

The designated initializer for a storyboard segue.

- perform

Performs a visual transition from one controller to another.