---
title: "init(identifier:source:destination:performHandler:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uistoryboardsegue/init(identifier:source:destination:performhandler:)"
---

# init(identifier:source:destination:performHandler:)

Creates a segue that calls a block to perform the segue transition.

## Declaration

```swift
convenience init(identifier: String?, source: UIViewController, destination: UIViewController, performHandler: @escaping () -> Void)
```

## Parameters

- `identifier`: The identifier you want to associate with this particular instance of the segue. You can use this identifier to differentiate one type of segue from another at runtime.
- `source`: The view controller visible at the start of the segue.
- `destination`: The view controller to display after the completion of the segue.
- `performHandler`: A block to be called when the segue’s doc://com.apple.uikit/documentation/UIKit/UIStoryboardSegue/perform() method is called.

## Return Value

Return Value An initialized segue object.

## Discussion

Discussion You use this method as an alternative to creating a subclass. Your perform handler should do all of the work necessary to transition between the source and destination view controllers, exactly as if you were implementing the perform() method.

## See Also

### Related Documentation

- [perform()](uikit/uistoryboardsegue/perform().md)
