func badge(Text?) -> some View
Generates a badge for the view from a text view.
func badge<S>(S?) -> some View
Generates a badge for the view from a string.
func badge(Int) -> some View
Generates a badge for the view from an integer value.
Availability 有効性
Technology
func badge(_ key: LocalizedStringKey
?) -> some View
key
An optional string key to display as a badge. Set the value to nil
to hide the badge.
Badges are only displayed in list rows and tab bars.
Use a badge to convey optional, supplementary information about a view. Keep the contents of the badge as short as possible.
This modifier creates a Text
view on your behalf, and treats the localized key similar to init(_:
. See Text
for more information about localizing strings.
Text
を文字列のローカライズについてのさらなる情報として見てください。
func badge(Text?) -> some View
func badge<S>(S?) -> some View
func badge(Int) -> some View