pencilkit

Community

Enable Apple Pencil drawing and persistent ink

AuthorKumarAdi8
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Capture native Apple Pencil and touch input, manage drawing tools, and persist ink so apps can offer reliable drawing, annotation, signature capture, and exportable artwork without reinventing the input pipeline.

Core Features & Use Cases

  • Canvas input capture: Configure and manage a PKCanvasView to accept pencil and finger strokes with appropriate drawingPolicy and tool assignments.
  • Tool management and UX: Present and observe a PKToolPicker to let users choose inks, erasers, lasso, and ruler tools while keeping the picker lifecycle correct.
  • Persistence and export: Serialize PKDrawing to Data, combine and transform drawings, export regions as images, and manage content version compatibility for cross-version sharing.
  • SwiftUI integration: Provide a UIViewRepresentable wrapper pattern to bind PKDrawing into SwiftUI and avoid update loops.
  • Use Case: Add an annotation editor to a document app that lets users draw with Apple Pencil, switch tools, save drawings to disk, and generate thumbnails for a gallery.

Quick Start

Embed a canvas view or SwiftUI wrapper bound to a PKDrawing state, show the tool picker for the canvas, capture edits, and save the drawing.dataRepresentation() to a file when the user finishes.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: pencilkit
Download link: https://github.com/KumarAdi8/AgentKit/archive/main.zip#pencilkit

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.