Contents

PaperMarkupViewController

A view controller for interactively creating and showing markup.

Declaration

@MainActor @objc @preconcurrency class PaperMarkupViewController

Mentioned in

Overview

Properties are observable, so to save markup changes to disk, iterate over the changes to markup.

let markups = Observations.untilFinished { [weak paperViewController] in
    if let markup = paperViewController?.markup {
        return .next(markup)
    }
    return .finish
}
Task { [weak self] in
    for await newMarkup in markups {
        self?.save(model)
    }
}

Topics

Creating a view controller

Displaying markup

Editing markup

Controlling touch input

Selecting elements

Managing adornments

Scrolling and zooming

Responding to changes

Managing first responder status

Managing view lifecycle

Deprecated

See Also

View controllers