<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVKit",
  "identifier" : "/documentation/AVKit/AVExperienceController/TransitionGroup/addTransition(operation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVKit"
    ],
    "preciseIdentifier" : "s:5AVKit22AVExperienceControllerC15TransitionGroupV03addD09operationyxyYaYAcn_tF"
  },
  "title" : "addTransition(operation:)"
}
-->

# addTransition(operation:)

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

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

## Parameters

`operation`

A closure that performs a transition and returns a result.

## Discussion

Call [`transition(to:)`](/documentation/AVKit/AVExperienceController/transition(to:)) on an [`AVExperienceController`](/documentation/AVKit/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:)`](/documentation/AVKit/AVExperienceController/withTransitionGroup(body:)) includes the value you return from the closure in the order
transitions were added.

```swift
group.addTransition {
    await controller.transition(to: .multiview)
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)