<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScribbleInteraction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScribbleInteraction"
  },
  "title" : "UIScribbleInteraction"
}
-->

# UIScribbleInteraction

An interaction for customizing the behavior of Scribble on text input views, or for suppressing it entirely in specific cases.

```
@MainActor class UIScribbleInteraction
```

## Overview

By default, Scribble lets users enter text by writing directly into any editable view that implements [`UITextInput`](/documentation/UIKit/UITextInput).

In apps with customized text fields, you can use the [`UIScribbleInteractionDelegate`](/documentation/UIKit/UIScribbleInteractionDelegate) callbacks to optimize the UI for a better writing experience. For example, you can hide custom placeholders when the user starts writing, or delay focusing on the field if it moves while gaining focus.

With text views that support drawing with Apple Pencil, you’ll need to suppress Scribble on nearby text fields to keep them from taking over the Pencil events for writing.

## Topics

### Creating a Scribble interaction

[`-  initWithDelegate:`](/documentation/UIKit/UIScribbleInteraction/init(delegate:))

Creates a Scribble interaction that allows customizing the behavior of Scribble on text input views with the delegate you provide.

### Managing Scribble interactions

[`delegate`](/documentation/UIKit/UIScribbleInteraction/delegate)

The object that acts as the delegate for this interaction and responds to Scribble events for text input views.

### Detecting writing

[`handlingWriting`](/documentation/UIKit/UIScribbleInteraction/isHandlingWriting)

A Boolean value that indicates whether the user is actively writing in a text view.

### Expecting input from Apple Pencil

[`pencilInputExpected`](/documentation/UIKit/UIScribbleInteraction/isPencilInputExpected)

A Boolean value that indicates the user is likely to use Apple Pencil and handwriting instead of the keyboard to enter text.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`UIInteraction`](/documentation/UIKit/UIInteraction)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)