<!--
{
  "availability" : [
    "iOS: 17.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JournalingSuggestions",
  "identifier" : "/documentation/JournalingSuggestions/JournalingSuggestionsPicker/init(_:onCompletion:)-7uxov",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Journaling Suggestions",
      "JournalingSuggestions"
    ],
    "preciseIdentifier" : "s:21JournalingSuggestions0aB6PickerVAA7SwiftUI4TextVRszrlE_12onCompletionACyAFGAD18LocalizedStringKeyV_yAA0A10SuggestionVYactcfc"
  },
  "title" : "init(_:onCompletion:)"
}
-->

# init(_:onCompletion:)

Creates a suggestions picker with button text defined by the given localized string key.

```
@MainActor @preconcurrency init(_ title: LocalizedStringKey, onCompletion: @escaping (JournalingSuggestion) async -> Void)
```

## Parameters

`title`

A localized string key that describes the suggestion picker’s purpose in the context of your app.

`onCompletion`

Code that you supply, which processes any suggestions that a person chooses in the picker.

## Discussion

This initializer creates a text view similar to the results of calling
<doc://com.apple.documentation/documentation/SwiftUI/Text/init(_:tableName:bundle:comment:)>.
See <doc://com.apple.documentation/documentation/SwiftUI/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)