MarkupAutoresizing
Automatic sizing behaviors for this markup.
Declaration
struct MarkupAutoresizingOverview
Controls whether the markup automatically adjusts its dimensions to fit content changes.
var textBox = ShapeMarkup(
frame: CGRect(x: 0, y: 0, width: 100, height: 50),
shape: .rectangle,
attributedText: AttributedString("Short"),
autoresizing: [.flexibleWidth]
)
textBox.attributedText = AttributedString("This is much longer text")
// textBox.frame.width is unaffected, but textBox.renderFrame.width has automatically increased