Skip to content

Structure

AttributeContainer

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
A container for attribute keys and values.
@dynamicMemberLookup struct AttributeContainer

Overview

AttributeContainer provides a way to store attributes and their values outside of an attributed string. You use this type to initialize an instance of AttributedString with preset attributes, and to set, merge, or replace attributes in existing attributed strings.

Topics

Structures

  • struct Builder
    A type that iteratively builds attribute containers by setting attribute values.

Initializers

  • init()
    Creates an empty attribute container.

Instance Methods

Subscripts

Type Subscripts

Default Implementations

Relationships

Conforms To

  • Swift.Copyable
  • Swift.CustomStringConvertible
  • Swift.Equatable
  • Swift.Escapable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype