---
title: PKToolPicker
framework: pencilkit
role: symbol
role_heading: Class
path: pencilkit/pktoolpicker
---

# PKToolPicker

A tool palette that displays a selection of drawing tools and colors for tools that a person can choose from.

## Declaration

```swift
class PKToolPicker
```

## Mentioned in

Supporting backward compatibility for ink types

## Overview

Overview A PKToolPicker manages a draggable palette that displays drawing tools, colors, and additional options. You add a tool picker to your interface and configure it to display its palette at appropriate times. While the palette is onscreen, a person may reposition it anywhere within the current window. When a person interacts with the palette, the tool picker notifies registered observers of the changes so that they can respond. important: The tool picker doesn’t display in Mac apps built with Mac Catalyst. When configuring your interface, call the setVisible(_:forFirstResponder:) method to associate the tool picker with one or more views in your interface. Each window manages its own tool picker, and the window’s first responder determines the visibility of that tool picker. When one of the registered objects becomes first responder, the tool picker automatically adds its palette view to the current window. When there isn’t a registered object as first responder, the tool picker hides its palette view. PKCanvasView implements the observer protocol for detecting tool picker changes. Adding your canvas view as an observer to a tool picker automatically updates the current drawing tools. For more information about implementing custom observer objects, see PKToolPickerObserver.

## Topics

### Creating a tool picker

- [init()](pencilkit/pktoolpicker/init().md)
- [init(toolItems:)](pencilkit/pktoolpicker/init(toolitems:).md)
- [PKToolPickerInkingItem](pencilkit/pktoolpickerinkingitem.md)
- [PKToolPickerEraserItem](pencilkit/pktoolpickereraseritem.md)
- [PKToolPickerLassoItem](pencilkit/pktoolpickerlassoitem.md)
- [PKToolPickerRulerItem](pencilkit/pktoolpickerruleritem.md)
- [PKToolPickerScribbleItem](pencilkit/pktoolpickerscribbleitem.md)
- [PKToolPickerCustomItem](pencilkit/pktoolpickercustomitem.md)
- [PKToolPickerItem](pencilkit/pktoolpickeritem.md)

### Accessing the picker’s tools

- [toolItems](pencilkit/pktoolpicker/toolitems.md)

### Detecting changes to the picker

- [addObserver(_:)](pencilkit/pktoolpicker/addobserver(_:).md)
- [removeObserver(_:)](pencilkit/pktoolpicker/removeobserver(_:).md)
- [PKToolPickerObserver](pencilkit/pktoolpickerobserver.md)

### Coordinating the visibility of the picker

- [setVisible(_:forFirstResponder:)](pencilkit/pktoolpicker/setvisible(_:forfirstresponder:).md)
- [isVisible](pencilkit/pktoolpicker/isvisible.md)
- [frameObscured(in:)](pencilkit/pktoolpicker/frameobscured(in:).md)

### Managing selected tools

- [selectedToolItem](pencilkit/pktoolpicker/selectedtoolitem.md)
- [selectedToolItemIdentifier](pencilkit/pktoolpicker/selectedtoolitemidentifier.md)

### Customizing picker behavior

- [isRulerActive](pencilkit/pktoolpicker/isruleractive.md)
- [colorUserInterfaceStyle](pencilkit/pktoolpicker/coloruserinterfacestyle.md)
- [overrideUserInterfaceStyle](pencilkit/pktoolpicker/overrideuserinterfacestyle.md)
- [showsDrawingPolicyControls](pencilkit/pktoolpicker/showsdrawingpolicycontrols.md)
- [stateAutosaveName](pencilkit/pktoolpicker/stateautosavename.md)

### Configuring the accessory item

- [accessoryItem](pencilkit/pktoolpicker/accessoryitem.md)

### Supporting PencilKit versions

- [maximumSupportedContentVersion](pencilkit/pktoolpicker/maximumsupportedcontentversion.md)

### Deprecated

- [shared(for:)](pencilkit/pktoolpicker/shared(for:).md)
- [selectedTool](pencilkit/pktoolpicker/selectedtool-2lptq.md)

### Protocols

- [PKToolPicker.Delegate](pencilkit/pktoolpicker/delegate-swift.protocol.md)

### Instance Properties

- [colorMaximumLinearExposure](pencilkit/pktoolpicker/colormaximumlinearexposure.md)
- [delegate](pencilkit/pktoolpicker/delegate-swift.property.md)
- [prefersDismissControlVisible](pencilkit/pktoolpicker/prefersdismisscontrolvisible.md)

### Type Properties

- [defaultToolItems](pencilkit/pktoolpicker/defaulttoolitems.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Tools

- [Configuring the PencilKit tool picker](pencilkit/configuring-the-pencilkit-tool-picker.md)
- [PKInkingTool](pencilkit/pkinkingtool-swift.struct.md)
- [PKEraserTool](pencilkit/pkerasertool-swift.struct.md)
- [PKLassoTool](pencilkit/pklassotool-swift.struct.md)
- [PKTool](pencilkit/pktool-swift.protocol.md)
