One Logo Pool Ball
Foundation · IOS API REFERENCE

Duration.UnitsFormatStyle.Attributed

struct · iOS 16.0+ · SDK 27.1

@dynamicMemberLookup struct Attributed

A format style to format a duration as an attributed string. Units in the string are annotated with the `durationField` and `measurement` attribute keys and the `DurationFieldAttribute` and `MeasurementAttribute` attribute values. You can use `Duration.UnitsFormatStyle` to configure the style, and create an `Attributed` format with its `public var attributed: Attributed` For example, formatting a duration of 2 hours, 43 minutes, 26.25 second in `en_US` locale yeilds the following conceptually ``` 2 { durationField: .hours, component: .value } hours { durationField: .hours, component: .unit } , { nil } 43 { durationField: .minutes, component: .value } minutes { durationField: .minutes, component: .unit } , { nil } 26.25 { durationField: .seconds, component: .value } seconds { durationField: .seconds, component: .unit } ```

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Duration.UnitsFormatStyle.Attributed.format(_:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

Duration.UnitsFormatStyle.Attributed.locale(_:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

Duration.UnitsFormatStyle.Attributed.subscript(dynamicMember:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

Duration.UnitsFormatStyle.Attributed.subscript(dynamicMember:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

Duration.UnitsFormatStyle.Attributed.discreteInput(before:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

Duration.UnitsFormatStyle.Attributed.discreteInput(after:)

The iOS SDK compiler rejected this binding: 'UnitsFormatStyle' is not a member type of struct 'Darwin.Duration' (aka 'Swift.Int32')

All Foundation types →