Contents

init(style:locale:)

Creates an instance using the provided format style and locale.

Declaration

init(style: PersonNameComponents.FormatStyle.Style = .medium, locale: Locale = .autoupdatingCurrent)

Parameters

  • style:

    The Style Swift.enum used to format the name.

  • locale:

    The Locale used to create the string representation of the name.

Discussion

Customize the person name components format style by providing a style and a locale.

The formatted style can be long, medium, short, or abbreviated. The default value is PersonNameComponents.FormatStyle.Style.medium.

The locale provides linguistic and cultural context to the formatted name. The default value is autoupdatingCurrent.