---
title: sourceController
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsstoryboardsegue/sourcecontroller
---

# sourceController

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

## Declaration

```swift
var sourceController: Any { get }
```

## Discussion

Discussion In your storyboard segue subclass, you can read this property to get the starting/containing view controller or window controller for the segue.

## See Also

### Inspecting a Storyboard Segue

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