> 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/drawing/background.md).

# background

[SwiftUI](/ios/swiftui.md) ⟩ [view](/ios/swiftui/view.md) ⟩ [drawing](/ios/swiftui/view/drawing.md) ⟩ background

{% tabs %}
{% tab title="🔴 主題" %}

* [background style](/ios/swiftui/view/drawing/background/style.md)
* [.background()](/ios/swiftui/view/drawing/background/.background.md)
* [Broken mention](broken://pages/SLp7NOR7ihtTfaoUrQI3)
  {% endtab %}

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

```swift
view
    .background(.ultraThinMaterial) // material
    .background(Image("Blob 1"))    // image
    .background(.regularMaterial,   // material in shape
        in: RoundedRectangle(cornerRadius: 8)
    )
```

{% endtab %}

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

* View ⟩&#x20;
  * [.background(\_:ignoresSafeAreaEdges:)](https://developer.apple.com/documentation/swiftui/view/background\(_:ignoressafeareaedges:\))
  * [.background(\_:in:fillStyle:)](https://developer.apple.com/documentation/swiftui/view/background\(_:in:fillstyle:\)-20tq5) - background with a particular shape
    {% endtab %}

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

* Design+Code ⟩ [Material and Foreground Style](https://designcode.io/swiftui-ios15-material-foreground-style)
* Sundell ⟩ [Background & overlay in Swift](https://www.swiftbysundell.com/articles/backgrounds-and-overlays-in-swiftui/)
  {% endtab %}

{% tab title="🖥️ 影片" %}
{% embed url="<https://youtu.be/jFgTwL4Bkq8>" %}
tundsdev ⟩ Background and Overlay In SwiftUI
{% endembed %}
{% endtab %}
{% endtabs %}
