<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "macOS: 14.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TableColumnBuilder/buildEither(first:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18TableColumnBuilderV11buildEither5firstAA19_ConditionalContentVyqd__qd_0_Gqd___t0C8RowValueQyd__Rsz0cD14SortComparatorQyd__Rs_AA0cdJ0Rd__AaMRd_0_AKQyd_0_ALRSAIQyd_0_AJRSr0_lFZ::OverloadGroup"
  },
  "title" : "buildEither(first:)"
}
-->

# buildEither(first:)

Creates a column result for the first of two column content
alternatives.

```
@export(implementation) static func buildEither<T, F>(first: T) -> _ConditionalContent<T, F> where RowValue == T.TableRowValue, Sort == T.TableColumnSortComparator, T : TableColumnContent, F : TableColumnContent, T.TableColumnSortComparator == F.TableColumnSortComparator, T.TableRowValue == F.TableRowValue
```

## Discussion

This method provides support for “if” statements in multi-statement
closures, producing conditional content for the “then” branch.

---

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)