One Logo Pool Ball
Foundation · IOS API REFERENCE

PersonNameComponents.FormatStyle

struct · iOS 15.0+ · SDK 27.1

struct FormatStyle

A type used to format a person's name with a style appropriate for the given locale.

Members (9)

get · iOS 15.0+

attributed

TypeScript
get attributed(): PersonNameComponents_AttributedStyle
Swift declaration
var attributed: PersonNameComponents.AttributedStyle { get }

The style used to create a locale-aware attributed string representation of an instance of person name components.

get · iOS 15.0+

parseStrategy

TypeScript
get parseStrategy(): PersonNameComponents_ParseStrategy
Swift declaration
var parseStrategy: PersonNameComponents.ParseStrategy { get }

The strategy used to parse a string into person name components.

init · iOS 15.0+

init

TypeScript
static init(style?: PersonNameComponents_FormatStyle_Style, locale?: Locale): PersonNameComponents_FormatStyle
Swift declaration
init(style: PersonNameComponents.FormatStyle.Style = .medium, locale: Locale = .autoupdatingCurrent)

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)
Swift declaration
var style: PersonNameComponents.FormatStyle.Style

Specifies the style of the formatted result.

method · iOS 15.0+

format

TypeScript
format(value: PersonNameComponents): string
Swift declaration
func format(_ value: PersonNameComponents) -> String

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.

method · iOS 15.0+

locale

TypeScript
locale92818(locale: Locale): PersonNameComponents_FormatStyle
Swift declaration
func locale(_ locale: Locale) -> PersonNameComponents.FormatStyle

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.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →