---
title: "init(identifier:source:destination:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsstoryboardsegue/init(identifier:source:destination:)"
---

# init(identifier:source:destination:)

The designated initializer for a storyboard segue.

## Declaration

```swift
init(identifier: NSStoryboardSegue.Identifier, source sourceController: Any, destination destinationController: Any)
```

## Parameters

- `identifier`: The unique identifier for the storyboard segue. See the doc://com.apple.appkit/documentation/AppKit/NSStoryboardSegue/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.

## Return Value

Return Value An initialized storyboard segue, ready to be performed.

## Discussion

Discussion When a segue begins, the system calls this method. To run code during segue initialization, implement a storyboard segue subclass and override this method. Whenever this method is called, the system then calls the perform() method.

## See Also

### Customizing Storyboard Segue Initialization and Invocation

- [init(identifier:source:destination:performHandler:)](appkit/nsstoryboardsegue/init(identifier:source:destination:performhandler:).md)
- [perform()](appkit/nsstoryboardsegue/perform().md)
