Initializer

init(_:)

Creates a reference-type attributed string from the specified value-type attributed string.

Declaration 宣言

convenience init(_ attrStr: AttributedString)

Parameters パラメータ

attrStr

The value type attributed string that provides the text and attributes of the new object.

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:) or init(_:including:).

See Also 参照

Creating a Reference-Type Attributed String from a Value Type