---
title: "callAsFunction(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/layout/callasfunction(_:)"
---

# callAsFunction(_:)

Combines the specified views into a single composite view using the layout algorithms of the custom layout container.

## Declaration

```swift
func callAsFunction<V>(@ContentBuilder _ content: () -> V) -> some View where V : View

```

## Parameters

- `content`: A doc://com.apple.SwiftUI/documentation/SwiftUI/ContentBuilder that contains the views to lay out.

## Return Value

Return Value A composite view that combines all the input views.

## Discussion

Discussion Don’t call this method directly. SwiftUI calls it when you instantiate a custom layout that conforms to the Layout protocol: BasicVStack { // Implicitly calls callAsFunction.     Text("A View")     Text("Another View") } For information about how Swift uses the callAsFunction() method to simplify call site syntax, see Methods with Special Names in The Swift Programming Language.
