<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKEraserToolReference/init(eraserType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PKEraserTool(im)initWithEraserType:"
  },
  "title" : "init(eraserType:)"
}
-->

# init(eraserType:)

Creates an eraser tool object that removes objects wholly or partially from a canvas view.

```
init(eraserType: __PKEraserType)
```

## Parameters

`eraserType`

A constant that determines how the eraser affects drawn content. For a list of possible values, see [`PKEraserType`](/documentation/PencilKit/PKEraserType).

## Return Value

A new eraser tool object.

---

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)