<!--
{
  "documentType" : "article",
  "framework" : "ApplePencil",
  "identifier" : "/documentation/ApplePencil",
  "metadataVersion" : "0.1.0",
  "role" : "collection",
  "title" : "Apple Pencil"
}
-->

# Apple Pencil

Enhance your iPad app’s user experience by supporting drawing, handwriting, and other features of Apple Pencil.

## Overview

Apple Pencil is an input accessory for iPad that people rely on for tasks like drawing, sketching, painting, jotting notes, marking up documents, and more.
In addition to drawing and handwriting, Apple Pencil can also serve as a pointer and UI interaction tool.

![An illustration that shows a hand holding Apple Pencil and making a mark on a digital drawing canvas.](images/com.apple.ApplePencil/apple-pencil-framework-hero@2x.png)

As you optimize your app for iPad, there are many ways you can enhance it with Apple Pencil features.
Choose the features that make the most sense in the context of your app, and adopt those features using APIs from PencilKit, SwiftUI, and UIKit.

- **Drawing**: Apple Pencil integrates seamlessly with PencilKit, a framework that lets you incorporate hand-drawn content into your app. PencilKit provides tools for creating, erasing, and selecting pencil strokes on a drawing canvas. You can also implement drawing with high-precision touches from UIKit. Input from Apple Pencil provides data like azimuth, altitude, roll angle, and the amount of force recorded at its tip, which you can use to create rich drawing experiences.
- **Handwriting**: With Apple Pencil, people can enter handwritten text in any text field, and Scribble automatically converts their handwriting into typed text input. Scribble is available in multiple languages and is on by default. You can also customize Scribble behavior to meet your app’s needs using the Scribble API in UIKit.
- **Double tap and squeeze**: People can double-tap and squeeze certain models of Apple Pencil to perform actions quickly. People choose which action they want to perform in response to a double tap or squeeze in Settings, or you can implement a custom action that’s specific to your app. You handle a double tap or squeeze using SwiftUI or UIKit.
- **Haptics**: Apple Pencil Pro can provide tactile feedback by playing haptics. Used sparingly and consistently, haptic feedback can enhance the experience of using Apple Pencil Pro to perform tasks like snapping objects to a grid. You provide haptic feedback using the sensory feedback API in SwiftUI or the feedback generators API in UIKit.
- **Hover**: When a person holds a supported model of Apple Pencil close above the screen without touching it, the pencil can provide information about the distance of the tip from the screen. You can use this hover distance to create more expressive drawing and input experiences with Apple Pencil. You get this information using hover gestures in UIKit.
- **Pointers**: Apple Pencil can behave similar to a pointer, like a trackpad or mouse. For example, you can configure your views to provide visual feedback when a person holds Apple Pencil over the view. Add visual feedback to your views during hover using hover events in SwiftUI or pointer interactions in UIKit.

For more details on Apple Pencil features and compatibility, see [Apple Pencil](https://www.apple.com/apple-pencil/).

#### Related videos

  <doc://com.apple.documentation/videos/play/wwdc2019/221>

  <doc://com.apple.documentation/videos/play/wwdc2020/10107>

  <doc://com.apple.documentation/videos/play/wwdc2020/10106>

  <doc://com.apple.documentation/videos/play/wwdc2020/10148>

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/Updates/ApplePencil>

### Drawing

  <doc://com.apple.documentation/documentation/PencilKit/drawing-with-pencilkit>

  <doc://com.apple.documentation/documentation/PencilKit/inspecting-modifying-and-constructing-pencilkit-drawings>

  <doc://com.apple.documentation/documentation/UIKit/getting-high-fidelity-input-with-coalesced-touches>

  <doc://com.apple.documentation/documentation/UIKit/implementing-coalesced-touch-support-in-an-app>

### Handwriting

  <doc://com.apple.documentation/documentation/PencilKit/customizing-scribble-with-interactions>

  <doc://com.apple.documentation/documentation/UIKit/handwriting-recognition>

### Double tap and squeeze

  <doc://com.apple.documentation/documentation/UIKit/apple-pencil-interactions>

[Handling squeezes from Apple Pencil](/documentation/ApplePencil/handling-squeezes-from-apple-pencil)

Detect and respond to squeezes a person makes on Apple Pencil Pro.

[Handling double taps from Apple Pencil](/documentation/ApplePencil/handling-double-taps-from-apple-pencil)

Detect and respond to double taps a person makes on Apple Pencil.

### Haptics

[Playing haptic feedback in your app](/documentation/ApplePencil/playing-haptic-feedback-in-your-app)

Provide tactile feedback when people perform certain actions in your app.

### Hover

  <doc://com.apple.documentation/documentation/UIKit/adopting-hover-support-for-apple-pencil>

### Pointers

  <doc://com.apple.documentation/documentation/SwiftUI/Input-events>

  <doc://com.apple.documentation/documentation/UIKit/pointer-interactions>

  <doc://com.apple.documentation/documentation/UIKit/integrating-pointer-interactions-into-your-ipad-app>

### Design

  <doc://com.apple.documentation/design/Human-Interface-Guidelines/apple-pencil-and-scribble>

  <doc://com.apple.documentation/design/Human-Interface-Guidelines/playing-haptics>



---

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)