---
title: "view(forKey:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewcontrollertransitioncoordinatorcontext/view(forkey:)"
---

# view(forKey:)

Returns the specified view involved in the transition.

## Declaration

```swift
func view(forKey key: UITransitionContextViewKey) -> UIView?
```

## Parameters

- `key`: The key identifying the view you want. For a list of possible keys, see doc://com.apple.uikit/documentation/UIKit/UITransitionContextViewKey.

## Return Value

Return Value The view object for the specified key or nil if the view could not be found.

## See Also

### Getting the views and view controllers

- [viewController(forKey:)](uikit/uiviewcontrollertransitioncoordinatorcontext/viewcontroller(forkey:).md)
- [containerView](uikit/uiviewcontrollertransitioncoordinatorcontext/containerview.md)
