---
title: "buildIf(_:)"
framework: mapkit
role: symbol
role_heading: Type Method
path: "mapkit/mapcontentbuilder/buildif(_:)"
---

# buildIf(_:)

Compares content in a multistatement closure, that produces an optional view that’s visible if the argument you provide evaluates to true.

## Declaration

```swift
static func buildIf<Content>(_ content: Content?) -> Content? where Content : MapContent
```

## Parameters

- `content`: The map builder content the expression builder operates on.

## Return Value

Return Value Returns the conditional map content that meets the conditions the content builder expresses.

## See Also

### Conditionally building map content

- [buildEither(first:)](mapkit/mapcontentbuilder/buildeither(first:).md)
- [buildEither(second:)](mapkit/mapcontentbuilder/buildeither(second:).md)
- [buildExpression(_:)](mapkit/mapcontentbuilder/buildexpression(_:).md)
- [buildLimitedAvailability(_:)](mapkit/mapcontentbuilder/buildlimitedavailability(_:).md)
