> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/ios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/ios/swiftui/view/modifier/layout.md).

# layout modifier

╱🚧 under construction

[SwiftUI](/ios/swiftui.md) ⟩ [view](/ios/swiftui/view.md) ⟩ [modifier](/ios/swiftui/view/modifier.md) ⟩ layout modifier

{% hint style="success" %}
Tell a view how to arrange itself within a [view hierarchy](/ios/swiftui/view/hierarchy.md) by adjusting its <mark style="color:yellow;">size</mark>, <mark style="color:yellow;">position</mark>, <mark style="color:yellow;">alignment</mark>, <mark style="color:yellow;">padding</mark>, and so on.
{% endhint %}

:point\_right: see [view layout](/ios/swiftui/view/layout.md), [Layout](/ios/swiftui/container/layout/layout.md), [layout](/ios/swiftui/container/layout.md) (🚧 under construction)

{% tabs %}
{% tab title="💾 程式" %}

```swift
Ellipse()
    .frame(width: 200, height: 100)    // width, height: CGFloat
```

{% endtab %}

{% tab title="📘 手冊" %}

* [SwiftUI](https://developer.apple.com/documentation/swiftui) ⟩  [View fundamentals](https://developer.apple.com/documentation/swiftui/view-fundamentals) ⟩ [View](https://developer.apple.com/documentation/swiftui/view) ⟩  [Layout modifiers](https://developer.apple.com/documentation/swiftui/view-layout)
  * [.frame(width:height:alignment:)](https://developer.apple.com/documentation/swiftui/view/frame\(width:height:alignment:\))
  * [.fixedSize()](https://developer.apple.com/documentation/swiftui/view/fixedsize\(\))
    {% endtab %}

{% tab title="📗 參考" %}

* [ ] Sarun ⟩ [What is the fixedSize modifier in SwiftUI](https://sarunw.com/posts/swiftui-fixedsize/)
  {% endtab %}
  {% endtabs %}
