Creates an instance using the provided format style and locale.
- Parameters:
- style: The style to use when formatting the name. The default
value is ``Style/medium``.
- locale: The locale to use when formatting. The default value is
``Locale/autoupdatingCurrent``.
get · iOS 15.0+
style
TypeScript
get style(): PersonNameComponents_FormatStyle_Style
Swift declaration
var style: PersonNameComponents.FormatStyle.Style
Specifies the style of the formatted result.
set · iOS 15.0+
style
TypeScript
set style(value: PersonNameComponents_FormatStyle_Style)
Creates a string representation from a person name components value.
- Parameter value: The person name components to format.
- Returns: A string representation of the person name components.
get · iOS 15.0+
locale
TypeScript
get locale(): Locale
Swift declaration
var locale: Locale
The locale to use when formatting the person name components.
set · iOS 15.0+
locale
TypeScript
set locale(value: Locale)
Swift declaration
var locale: Locale
The locale to use when formatting the person name components.
Modifies the person name components format style to use the specified
locale.
- Parameter locale: The locale to use when formatting.
- Returns: A format style with the provided locale.