---
title: "init(_:onCompletion:)"
framework: journalingsuggestions
role: symbol
role_heading: Initializer
path: "journalingsuggestions/journalingsuggestionspicker/init(_:oncompletion:)-7uxov"
---

# init(_:onCompletion:)

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

## Declaration

```swift
@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

Discussion This initializer creates a text view similar to the results of calling init(_:tableName:bundle:comment:). See Text for more information about localizing strings.

## See Also

### Creating a suggestions picker

- [init(label:onCompletion:)](journalingsuggestions/journalingsuggestionspicker/init(label:oncompletion:).md)
- [init(_:onCompletion:)](journalingsuggestions/journalingsuggestionspicker/init(_:oncompletion:)-4e82p.md)
