---
title: "addTransition(operation:)"
framework: avkit
role: symbol
role_heading: Instance Method
path: "avkit/avexperiencecontroller/transitiongroup/addtransition(operation:)"
---

# addTransition(operation:)

Adds a transition to the group, suspending it until all transitions are ready to run together.

## Declaration

```swift
mutating func addTransition(operation: sending @escaping @isolated(any) () async -> ChildTransitionResult)
```

## Parameters

- `operation`: A closure that performs a transition and returns a result.

## Discussion

Discussion Call transition(to:) on an AVExperienceController within the operation closure. The transition suspends until all transitions have been added to the group, then perform together with the others. withTransitionGroup(body:) includes the value you return from the closure in the order transitions were added. group.addTransition {     await controller.transition(to: .multiview) }
