---
title: NSStoryboardSegue
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsstoryboardsegue
---

# NSStoryboardSegue

A transition or containment relationship between two scenes in a storyboard.

## Declaration

```swift
class NSStoryboardSegue
```

## Overview

Overview In this context, a scene is a view controller or a window controller and a storyboard is an instance of the NSStoryboard class. A storyboard segue has a procedural notion of being invoked, known in the API as being performed. You can take advantage of hooks into the segue performance process by way of the NSSeguePerforming protocol. You do not create storyboard segue objects directly. Instead, the system creates them as needed as segues are invoked. To run code during initialization and performance of a segue, override the init(identifier:source:destination:) and perform() methods. You can initiate a segue programmatically with the performSegue(withIdentifier:sender:) method of the NSSeguePerforming protocol. For example, you might do this to transition from a scene in one storyboard file to a scene in another.

## Topics

### Inspecting a Storyboard Segue

- [sourceController](appkit/nsstoryboardsegue/sourcecontroller.md)
- [destinationController](appkit/nsstoryboardsegue/destinationcontroller.md)
- [identifier](appkit/nsstoryboardsegue/identifier-swift.property.md)
- [NSStoryboardSegue.Identifier](appkit/nsstoryboardsegue/identifier-swift.typealias.md)

### Customizing Storyboard Segue Initialization and Invocation

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

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Storyboard

- [NSStoryboard](appkit/nsstoryboard.md)
- [NSSeguePerforming](appkit/nssegueperforming.md)
