Initializer
init(_:tableName:bundle:indicator:size:action:)
Creates a link with a localized text and a navigation indicator, looking up the key in the given bundle.
- iOS 15.0+
- macOS 13.0+
- tvOS 16.0+
- visionOS 1.0+
- watchOS 11.0+
@MainActor init(_ key: LocalizedStringKey, tableName: String? = nil, bundle: Bundle = .main, indicator: OUDSLink.Indicator, size: OUDSLink.Size = .default, action: @escaping () -> Void)
Parameters
- key
A LocalizedStringKey used to look up the text in the given bundle
- tableName
The name of the .strings file, or nil for the default
- bundle
The bundle in which to look up the localized string. Defaults to Bundle.main.
- indicator
Indicator displayed in the link
- size
Size of the link
- action
The action to perform when the user triggers the link
Discussion
OUDSLink(LocalizedStringKey("back_link"), bundle: Bundle.module, indicator: .back) { }