Instance Property
runs
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
The attributed runs of the attributed string, as a view into the underlying string.
var runs: AttributedString.Runs { get }
Discussion
Runs begin and end when the attributes for the characters change. Use this property to iterate over the runs with for-in syntax.