---
title: "buildEither(second:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/compositorcontentbuilder/buildeither(second:)"
---

# buildEither(second:)

Produces content for a conditional statement in a multi-statement closure when the condition is false.

## Declaration

```swift
static func buildEither<F>(second: F) -> _ConditionalContent<_LimitedAvailabilityCompositorContent, F> where F : CompositorContent
```

## Discussion

Discussion Conditional statements in a CompositorContentBuilder must contain both an if statement and an else statement, and the condition can only perform a compiler check for availability, like in the following code: var body: some CompositorContent {     if #available(visionOS 100, *) {         MyNewContent()     } else {         MyOldContent()     } }
