---
title: "init(_:)"
framework: pencilkit
role: symbol
role_heading: Initializer
path: "pencilkit/pkerasertool-swift.struct/init(_:)"
---

# init(_:)

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

## Declaration

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

## Parameters

- `eraserType`: A constant that determines how the eraser affects drawn content. For a list of possible values, see doc://com.apple.pencilkit/documentation/PencilKit/PKEraserTool-swift.struct/EraserType-swift.enum.

## Discussion

Discussion This initializer creates a new eraser tool object.

## See Also

### Creating an eraser tool

- [init(_:width:)](pencilkit/pkerasertool-swift.struct/init(_:width:).md)
