# Action Sheet

```swift
struct ContentView: View {
    @State private var sheetPresented = false

    var body: some View {
        Button(action: {
            self.sheetPresented = true
        }) {
            Text("Show Action Sheet")
        }
        .actionSheet(isPresented: $sheetPresented) {
            ActionSheet(title: Text("Action Sheet Title"), message: nil, buttons: [
                .default(Text("1st option"), action: {
                    // 1st option action
                }),
                .default(Text("2nd option"), action: {
                    // 2nd option action
                }),
                .destructive(Text("destructive option"), action: {
                    // destructive option action
                }),
                .cancel(Text("cancel btn"), action: {
                    // cancel
                })
            ])
        }
    }
}
```

![](/files/-M809mYuHhqh3cTDyCQ8)

`ActionSheet`'in görünmesini istediğimiz zaman ilgili `Binding<Bool>` değerini (örnekte `sheetPresented`) true yapmamız yeterli olacaktır.


---

# 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://eneskaraosman53.gitbook.io/swiftui/ui-components/action-sheet.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.
