> 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/custom/snippets/previews.md).

# view + previews

[swift](/ios/swift.md) ⟩ [custom](/ios/custom.md) ⟩ [snippets](/ios/custom/snippets.md) ⟩ previews

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

```swift
import SwiftUI

/// MyView
struct MyView: View {
    var body: some View {
        VStack {
            Text("Hello")
        }
    }
}
```

📁 Previews

```swift
// -------------- Previews --------------

struct MyView_Previews: PreviewProvider {
    static var previews: some View {
        MyView()
    }
}
```

{% endtab %}

{% tab title="👥 相關" %}

* [Slider](/ios/swiftui/control/slider.md)
  {% endtab %}
  {% endtabs %}
