init(_:onCompletion:)
Creates a suggestions picker with button text defined by the given localized string key.
Declaration
@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 init(_:tableName:bundle:comment:). See Text for more information about localizing strings.