<!--
{
  "availability" : [
    "iOS: 13.0.0 - 14.0.0",
    "iPadOS: 13.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKToolPicker/shared(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PKToolPicker(cm)sharedToolPickerForWindow:"
  },
  "title" : "shared(for:)"
}
-->

# shared(for:)

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

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

## Parameters

`window`

A window of your app.

## Return Value

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

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

---

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)