The locale to use when formatting person name components.
Instance Method
インスタンスメソッド
locale(_:)
Modifies the person name components format style to use the specified locale.
Availability 有効性
- iOS 15.0+
- iPadOS 15.0+
- macOS 12.0+
- Mac Catalyst 15.0+
- tvOS 15.0+
- watchOS 8.0+
- Xcode 13.0+
Technology
- Foundation ファウンデーション
Declaration 宣言
func locale(_ locale: Locale
) -> PersonNameComponents
.FormatStyle
Parameters パラメータ
locale
Return Value 戻り値
A person name components format style with the provided locale.
Relationships 関係
From Protocol 由来プロトコル
See Also 参照
Modifying a Format Style
var style: PersonNameComponents.FormatStyle.Style
Specifies the style of the formatted result.
enum PersonNameComponents.FormatStyle.Style
The type that represents the style of the formatted result.
var locale: Locale
The locale to use when formatting the person name components.
var attributed: PersonNameComponents.AttributedStyle
The style used to create a locale-aware attributed string representation of an instance of person name components.