Contents

init(identifier:source:destination:performHandler:)

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

Declaration

convenience init(identifier: NSStoryboardSegue.Identifier, source sourceController: Any, destination destinationController: Any, performHandler: @escaping () -> Void)

Parameters

  • identifier:

    The unique identifier for the storyboard segue. See the Identifier Swift.property 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