<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKEraserTool-swift.struct/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit12PKEraserToolVyA2C10EraserTypeOcfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

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

```
init(_ eraserType: PKEraserTool.EraserType)
```

## Parameters

`eraserType`

A constant that determines how the eraser affects drawn content. For a list of possible values, see [`PKEraserTool.EraserType`](/documentation/PencilKit/PKEraserTool-swift.struct/EraserType-swift.enum).

## Discussion

This initializer creates 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)