---
title: "shared(for:)"
framework: pencilkit
role: symbol
role_heading: Type Method
path: "pencilkit/pktoolpicker/shared(for:)"
---

# shared(for:)

Returns the tool picker object to use for the specified window.

## Declaration

```swift
class func shared(for window: UIWindow) -> PKToolPicker?
```

## Parameters

- `window`: A window of your app.

## Return Value

Return Value The tool picker associated with the window, or nil if an error occurred.

## Discussion

Discussion Call this method when you want to retrieve the tool picker assigned to one of your app’s windows. If the specified window doesn’t yet have a tool picker, this method creates and associates it with that window.

## See Also

### Deprecated

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