# 03.ViewBuilder参数10个限制

> 看看下面的代码，发现当`ViewBuilder`中超过10个元素的时候会报错，10个就没问题， 代码逻辑本身是没问题的 具体可以看下下面的文档，其实是将参数的个数做了限制

![01](/files/-MUpQnWD8ZAQhBmhCqP3) ![01](/files/-MUpQnWFthu_lNK8eKuj)

> [Apple文档：ViewBuilder](https://developer.apple.com/documentation/swiftui/viewbuilder)

```swift
static func buildBlock<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9>(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9) -> TupleView<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)>
```

> 不清楚苹果这样做的具体原因，但这样可以强迫咱们注意封装拆分。强行解释一波<\_<


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ryukiedev.gitbook.io/wiki/swiftui/03.viewbuilder-can-shu-10-ge-xian-zhi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
