The attribute container with the attributes to merge.
Instance Method
インスタンスメソッド
merge
mergeAttributes(_:mergePolicy:)
Merges the attributed string’s attributes with those in a specified attribute container.
Availability 有効性
- iOS 15.0+
- iPadOS 15.0+
- macOS 12.0+
- Mac Catalyst 15.0+
- tvOS 15.0+
- watchOS 8.0+
- Xcode 13.0+
Technology
- Foundation ファウンデーション
Declaration 宣言
mutating func mergeAttributes(_ attributes: AttributeContainer
, mergePolicy: AttributedString
.AttributeMergePolicy
= .keepNew)
Parameters パラメータ
attributes
mergePolicy
A policy to use when resolving conflicts between this string’s attributes and those in
attributes
.
Relationships 関係
From Protocol 由来プロトコル
See Also 参照
Applying and Modifying Attributes 属性の適用と修正
func setAttributes (AttributeContainer)
Sets the attributed string’s attributes to those in a specified attribute container.
属性付き文字列のもつ属性それらをある指定された属性コンテナの中のそれらへと設定します。
func settingAttributes (AttributeContainer) -> AttributedString
Returns an attributed string by setting the attributed string’s attributes to those in a specified attribute container.
属性付き文字列をその属性付き文字列のもつ属性それらをある指定された属性コンテナの中のそれらへと設定することによって返します。
func mergingAttributes (AttributeContainer, mergePolicy : AttributeMergePolicy) -> AttributedString
Returns an attributed string by merging the attributed string’s attributes with those in a specified attribute container.
enum AttributedString.AttributeMergePolicy
An enumeration of behaviors to apply when merging attributes.
func replaceAttributes (AttributeContainer, with: AttributeContainer)
Replaces occurrences of attributes in one attribute container with those in another attribute container.
一方の属性コンテナの中の属性それらの出現を別の属性コンテナの中のそれらと置き換えます。
func replacingAttributes (AttributeContainer, with: AttributeContainer) -> AttributedString
Returns an attributed string by replacing occurrences of attributes in one attribute container with those in another attribute container.
protocol AttributedStringAttributeMutation
A protocol that defines in-place mutations for attributes in an attributed string.
あるプロトコル、それはその場での変異をある属性付き文字列の中の属性それらに対して定義します。