---
title: "init(eraserType:)"
framework: pencilkit
role: symbol
role_heading: Initializer
path: "pencilkit/pkerasertoolreference/init(erasertype:)"
---

# init(eraserType:)

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

## Declaration

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

## 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/PKEraserType.

## Return Value

Return Value A new eraser tool object.

## See Also

### Creating an eraser tool

- [init(eraserType:width:)](pencilkit/pkerasertoolreference/init(erasertype:width:).md)
