> For the complete documentation index, see [llms.txt](https://eneskaraosman53.gitbook.io/swiftui/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eneskaraosman53.gitbook.io/swiftui/ui-components/picker.md).

# Picker

Belirli tercihler arasından seçim yapmaya yarar.

{% hint style="danger" %}
SwiftUI'ın şimdiki sürümünde `SegmentedPickerStyle`haricindeki stiller problemli gözüküyor.\
`DefaultPickerStyle` sadece `Form` içinde bulunurken çalışıyor. (Formun da NavigationView içinde olması gerekiyor.)
{% endhint %}

```swift
@State var options = (1...4).map { "Option - \($0)" }
@State var selectedOption: String = "Option - 1"

NavigationView {
    Form {
        
        Picker(selection: $selectedOption, label: Text("Select an option")) {
            ForEach(self.options, id: \.self) {
                Text($0)
            }
        }.pickerStyle(SegmentedPickerStyle())
        
        Picker(selection: $selectedOption, label: Text("Select an option")) {
            ForEach(self.options, id: \.self) {
                Text($0)
            }
        }.pickerStyle(WheelPickerStyle())
        
        Picker(selection: $selectedOption, label: Text("Select an option")) {
            ForEach(self.options, id: \.self) {
                Text($0)
            }
        }.pickerStyle(DefaultPickerStyle())
    
    }.padding()
}
```

![](https://1761232408-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M5Upqg27mOVmaED1CFL%2F-M6-cK_O_3YfPOmOZ8Vm%2F-M6-cOMF0czFTz7IJcLp%2FScreen%20Shot%202020-04-28%20at%2014.52.22.png?alt=media\&token=90ef858b-f5db-411b-bf83-c6d0dbdb8444)
