<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Picker/init(_:selection:content:)-6lwfn",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6PickerVA2A4TextVRszrlE_9selection7contentACyAEq_q0_GAA18LocalizedStringKeyV_AA7BindingVyq_Gq0_yXEtcfc"
  },
  "title" : "init(_:selection:content:)"
}
-->

# init(_:selection:content:)

Creates a picker that generates its label from a localized string key.

```
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<SelectionValue>, @ContentBuilder content: () -> Content)
```

## Parameters

`titleKey`

A localized string key that describes the purpose of
selecting an option.

`selection`

A binding to a property that determines the
currently-selected option.

`content`

A view that contains the set of options.

## Discussion

This initializer creates a `Text` view on your behalf, and treats the
localized key similar to `Text/init(_:tableName:bundle:comment:)`. See
`Text` for more information about localizing strings.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)