Contents

AttributeScopes.SwiftUIAttributes.StrikethroughStyleAttribute

A key for the line drawn through a run of attributed text.

Declaration

@frozen enum StrikethroughStyleAttribute

Overview

Set this key to mark text as no longer current, such as a completed item or a superseded price. The value carries both the pattern and the color of the line:

var price = AttributedString("$24.00")
price.strikethroughStyle = .single

Text(price)