<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKCanvasView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PKCanvasView"
  },
  "title" : "PKCanvasView"
}
-->

# PKCanvasView

A view that captures Apple Pencil input and displays the rendered results in an iOS app.

```
class PKCanvasView
```

## Overview

A [`PKCanvasView`](/documentation/PencilKit/PKCanvasView) object captures content drawn using Apple Pencil or the user’s finger and displays it in your app. The canvas view handles all of the touch events and data coming from Apple Pencil, and renders that information using the tool you specify. The canvas stores the captured input in a [`PKDrawingReference`](/documentation/PencilKit/PKDrawingReference) object.

[`PKCanvasView`](/documentation/PencilKit/PKCanvasView) is a scroll view, so you can make the drawable area bigger than the canvas view’s frame rectangle. To do that, set the inherited <doc://com.apple.documentation/documentation/UIKit/UIScrollView/contentSize> property to the size you want. The canvas view automatically scales its underlying content to match the size you specify. Users scroll around the canvas using a two-finger pan gesture. (If the [`allowsFingerDrawing`](/documentation/PencilKit/PKCanvasView/allowsFingerDrawing) property is `false`, users scroll with only one finger.)

A canvas view conforms to the [`PKToolPickerObserver`](/documentation/PencilKit/PKToolPickerObserver) protocol, so you can add it as an observer of the window’s tool picker. The tool picker displays a floating palette of tools that the user can choose from. As the user interacts with items in the palette, such as changing ink colors, or line widths, the canvas automatically updates its drawing environment accordingly.

## Topics

### Responding to drawing-related changes

[`delegate`](/documentation/PencilKit/PKCanvasView/delegate)

The object you use to respond to changes in the drawn content or with the selected tool.

[`PKCanvasViewDelegate`](/documentation/PencilKit/PKCanvasViewDelegate)

Methods for monitoring drawing related changes in a canvas view.

### Configuring the drawing environment

[`tool`](/documentation/PencilKit/PKCanvasView/tool-1kj57)

The currently selected tool used for drawing.

[`tool`](/documentation/PencilKit/PKCanvasView/tool-6str6)

The currently selected tool used for drawing.

[`isRulerActive`](/documentation/PencilKit/PKCanvasView/isRulerActive)

A Boolean value that indicates whether a ruler view is visible on the canvas.

[`allowsFingerDrawing`](/documentation/PencilKit/PKCanvasView/allowsFingerDrawing)

A Boolean value that indicates whether the canvas accepts input from the user’s finger in addition to Apple Pencil.

[`drawingPolicy`](/documentation/PencilKit/PKCanvasView/drawingPolicy)

The policy that controls the types of touches allowed when drawing on the canvas.

[`PKCanvasViewDrawingPolicy`](/documentation/PencilKit/PKCanvasViewDrawingPolicy)

Constants that you use to specify the type of drawing gestures your app permits while the user draws on the canvas.

### Getting the drawing gesture recognizer

[`drawingGestureRecognizer`](/documentation/PencilKit/PKCanvasView/drawingGestureRecognizer)

The gesture recognizer that the canvas uses to track touch events.

### Getting the captured data

[`drawing`](/documentation/PencilKit/PKCanvasView/drawing)

The data object that the canvas uses to store drawn content.

### Managing stroke selection

[`selection`](/documentation/PencilKit/PKCanvasView/selection)

The identifiers of the strokes selected on the canvas.

### Supporting PencilKit versions

[`maximumSupportedContentVersion`](/documentation/PencilKit/PKCanvasView/maximumSupportedContentVersion)

The maximum version of PencilKit to support.

### Instance Properties

[`isDrawingEnabled`](/documentation/PencilKit/PKCanvasView/isDrawingEnabled)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)