public interface PKCanvasViewDelegate extends UIScrollViewDelegate
| Modifier and Type | Method and Description |
|---|---|
default void |
canvasViewDidBeginUsingTool(PKCanvasView canvasView)
Called when the user starts using a tool, eg.
|
default void |
canvasViewDidEndUsingTool(PKCanvasView canvasView)
Called when the user stops using a tool, eg.
|
default void |
canvasViewDidFinishRendering(PKCanvasView canvasView)
Called after setting `drawing` when the entire drawing is rendered and visible.
|
default void |
canvasViewDrawingDidChange(PKCanvasView canvasView)
Called after the drawing on the canvas did change.
|
scrollViewDidChangeAdjustedContentInset, scrollViewDidEndDecelerating, scrollViewDidEndDraggingWillDecelerate, scrollViewDidEndScrollingAnimation, scrollViewDidEndZoomingWithViewAtScale, scrollViewDidScroll, scrollViewDidScrollToTop, scrollViewDidZoom, scrollViewShouldScrollToTop, scrollViewWillBeginDecelerating, scrollViewWillBeginDragging, scrollViewWillBeginZoomingWithView, scrollViewWillEndDraggingWithVelocityTargetContentOffset, viewForZoomingInScrollViewdefault void canvasViewDidBeginUsingTool(PKCanvasView canvasView)
This does not include moving the ruler.
canvasView - The canvas view that the user started interacting with.default void canvasViewDidEndUsingTool(PKCanvasView canvasView)
canvasView - The canvas view that the user ended interacting with.default void canvasViewDidFinishRendering(PKCanvasView canvasView)
This method lets you know when the canvas view finishes rendering all of the currently visible content. This can be used to delay showing the canvas view until all content is visible.
This is called every time the canvasView transitions from partially rendered to fully rendered, including after setting the drawing, and after zooming or scrolling.
canvasView - The canvas view that finished rendering.default void canvasViewDrawingDidChange(PKCanvasView canvasView)
This may be called some time after the `canvasViewDidEndUsingTool:` delegate method. For example, when using the Apple Pencil, pressure data is delayed from touch data, this means that the user can stop drawing (`canvasViewDidEndUsingTool:` is called), but the canvas view is still waiting for final pressure values; only when the final pressure values are received is the drawing updated and this delegate method called.
It is also possible that this method is not called, if the drawing interaction is cancelled.
canvasView - The canvas view that changed.