Instance MethodFoundationEssentials
replaceAttributes(_:with:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Replaces the attributed substring’s attributes with those in a specified attribute container.
mutating func replaceAttributes(_ attributes: AttributeContainer, with others: AttributeContainer)
Parameters
attributesThe existing attributes to replace.
othersThe new attributes to apply.