PaperMarkupViewController
A view controller for interactively creating and showing markup.
Declaration
@MainActor @objc @preconcurrency class PaperMarkupViewControllerMentioned 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
directTouchModedirectTouchAutomaticallyDrawsindirectPointerTouchModePaperMarkupViewController.TouchMode
Selecting elements
Managing adornments
Scrolling and zooming
scrollConfigurationPaperMarkupViewController.ScrollConfigurationcontentVisibleFramesetContentVisibleFrame(_:animated:)zoomRange