---
title: UIViewControllerContextTransitioning
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uiviewcontrollercontexttransitioning
---

# UIViewControllerContextTransitioning

A set of methods that provide contextual information for transition animations between view controllers.

## Declaration

```swift
@MainActor protocol UIViewControllerContextTransitioning : NSObjectProtocol
```

## Overview

Overview Don’t adopt this protocol in your own classes, nor should you directly create objects that adopt this protocol. During a transition, the animator objects involved in that transition receive a fully configured context object from UIKit. Custom animator objects — objects that adopt the UIViewControllerAnimatedTransitioning or UIViewControllerInteractiveTransitioning protocol — should simply retrieve the information they need from the provided object. A context object encapsulates information about the views and view controllers involved in the transition. It also contains details about the how to execute the transition. For interactive transitions, the interactive animator object uses the methods of this protocol to report the animation’s progress. When the animation starts, the interactive animator object must save a pointer to the context object. Based on user interactions, the animator object then calls the updateInteractiveTransition(_:), finishInteractiveTransition(), or cancelInteractiveTransition() methods to report the progress toward completing the animation. Those methods send that information to UIKit so that it can drive the timing of the animations. important: When defining custom animator objects, always check the value returned by the isAnimated method to determine whether you should create animations at all. And when you do create transition animations, always call the completeTransition(_:) method from an appropriate completion block to let UIKit know when all of your animations have finished.

## Topics

### Accessing the transition objects

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

### Getting the transition frame rectangles

- [initialFrame(for:)](uikit/uiviewcontrollercontexttransitioning/initialframe(for:).md)
- [finalFrame(for:)](uikit/uiviewcontrollercontexttransitioning/finalframe(for:).md)

### Getting the transition behaviors

- [isAnimated](uikit/uiviewcontrollercontexttransitioning/isanimated.md)
- [isInteractive](uikit/uiviewcontrollercontexttransitioning/isinteractive.md)
- [presentationStyle](uikit/uiviewcontrollercontexttransitioning/presentationstyle.md)

### Reporting the transition progress

- [completeTransition(_:)](uikit/uiviewcontrollercontexttransitioning/completetransition(_:).md)
- [updateInteractiveTransition(_:)](uikit/uiviewcontrollercontexttransitioning/updateinteractivetransition(_:).md)
- [pauseInteractiveTransition()](uikit/uiviewcontrollercontexttransitioning/pauseinteractivetransition().md)
- [finishInteractiveTransition()](uikit/uiviewcontrollercontexttransitioning/finishinteractivetransition().md)
- [cancelInteractiveTransition()](uikit/uiviewcontrollercontexttransitioning/cancelinteractivetransition().md)
- [transitionWasCancelled](uikit/uiviewcontrollercontexttransitioning/transitionwascancelled.md)

### Getting the rotation factor

- [targetTransform](uikit/uiviewcontrollercontexttransitioning/targettransform.md)

### Constants

- [UITransitionContextViewControllerKey](uikit/uitransitioncontextviewcontrollerkey.md)
- [UITransitionContextViewKey](uikit/uitransitioncontextviewkey.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Non-interactive transitions

- [UIViewControllerAnimatedTransitioning](uikit/uiviewcontrolleranimatedtransitioning.md)
