pencilkit-drawing

Create Apple Pencil drawing canvases with PencilKit for iOS, iPadOS, and visionOS.

981|50|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill pencilkit-drawing-dpearson2699
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pencilkit-drawing
Source: https://github.com/dpearson2699/swift-ios-skills/tree/main/skills/pencilkit-drawing
Command: npx skills add https://github.com/dpearson2699/swift-ios-skills --skill pencilkit-drawing-dpearson2699

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables the integration of Apple Pencil drawing capabilities into your applications, allowing users to capture handwritten notes, sketches, and annotations seamlessly.

Core Features & Use Cases

  • Drawing Canvas: Provides a PKCanvasView for capturing Apple Pencil and finger input.
  • Tool Picker: Integrates PKToolPicker for easy access to drawing tools (pens, erasers, etc.).
  • Serialization: Supports saving and loading drawings using PKDrawing data representation.
  • Image Export: Allows exporting drawings to UIImage for further use.
  • Use Case: Integrate a signature capture field into your app, allow users to annotate documents, or build a simple sketching application.

Quick Start

Use the pencilkit-drawing skill to create a new drawing canvas and allow users to draw with Apple Pencil.

Frequently Asked Questions about pencilkit-drawing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Apple Pencil drawing and annotation to a SwiftUI app?

You can add Apple Pencil drawing and annotation to a SwiftUI app by integrating PencilKit's `PKCanvasView` to capture user input and `PKToolPicker` to provide drawing tools. This Skill facilitates creating drawing canvases for iOS and iPadOS.

Can I save and load PencilKit drawings in my iOS application?

Yes, you can save and load PencilKit drawings using the `PKDrawing` data representation for serialization. This Skill supports persisting handwritten notes and sketches, allowing your app to retain and reload user annotations.

Does PencilKit work with visionOS and iOS 26+ development?

PencilKit works with visionOS and supports Swift 6.2 and iOS 26+ development. This Skill enables Apple Pencil experiences across these platforms by leveraging `PKCanvasView` for input and tool management.

What is the best way to capture a signature field in an iPad app?

The best way to capture a signature field in an iPad app is using PencilKit's `PKCanvasView` to capture Apple Pencil input. This Skill facilitates building signature capture features by managing drawing data with `PKDrawing`.

How do I export a PencilKit drawing to an image in Swift?

You export a PencilKit drawing to an image by converting the `PKDrawing` data representation into a `UIImage`. This Skill supports image export, allowing you to use the captured sketches and annotations elsewhere in your application.

Are there limitations when using PencilKit for document annotation?

PencilKit for document annotation relies on `PKCanvasView` and `PKToolPicker` for input and tool management. While it supports serialization and image export, complex document integration requires custom coordination between the canvas and your document views.