Initializer
init(_:destination:)
Creates a control, consisting of a URL and a title key, used to navigate to a URL.
Declaration
宣言
Available when Label
is Text
.
Label
がText
である時に利用可能です。
Parameters
パラメータ
titleKey
The key for the localized title that describes the purpose of this link.
destination
Discussion
議論
Use Link
to create a control that your app uses to navigate to a URL that you provide. The example below creates a link to example.com
and uses Visit Example Co
as the title key to generate a link-styled view in your app:
Link("Visit Example Co",
destination: URL(string: "https://www.example.com/")!)
See Also
参照
Creating a Link
init<S>(S, destination: URL)
Creates a control, consisting of a URL and a title string, used to navigate to a URL.
Available when Label
is Text
.
Label
がText
である時に利用可能です。