case keepCurrent
A policy to keep the string’s current attribute value when merging multiple sets of attributes.
case keepNew
A policy to keep the newly-merged attribute value when merging multiple sets of attributes.
Availability 有効性
Technology
enum AttributedString
.AttributeMergePolicy
Use an Attributed
when working with methods like merge
to indicate how to resolve conflicts between multiple sets of attributes. When a source string and a merging attribute container both contain a given attribute with different values, the merge policy determines how to resolve the conflict.
case keepCurrent
case keepNew
var hashValue : Int
func hash(into: inout Hasher)
static func == (AttributedString.AttributeMergePolicy, AttributedString.AttributeMergePolicy) -> Bool
static func != (AttributedString.AttributeMergePolicy, AttributedString.AttributeMergePolicy) -> Bool
func setAttributes (AttributeContainer)
func settingAttributes (AttributeContainer) -> AttributedString
func mergeAttributes (AttributeContainer, mergePolicy : AttributedString.AttributeMergePolicy)
func mergingAttributes (AttributeContainer, mergePolicy : AttributeMergePolicy) -> AttributedString
func replaceAttributes (AttributeContainer, with: AttributeContainer)
func replacingAttributes (AttributeContainer, with: AttributeContainer) -> AttributedString
protocol AttributedStringAttributeMutation