Contents

init(_:)

Creates an attribute container from a dictionary, using default attribute scopes.

Declaration

init(_ dictionary: [NSAttributedString.Key : Any])

Parameters

  • dictionary:

    A dictionary of attribute keys and their values.

Discussion

This initializer includes all attribute scopes defined by the SDK, such as AttributeScopes.FoundationAttributes, AttributeScopes.SwiftUIAttributes, and AttributeScopes.AccessibilityAttributes. To use third-party attribute scopes, use the initializers init(_:including:) and init(_:including:).

See Also

Creating an Attribute Container