Contents

NSWritingToolsCoordinator.Delegate

An interface that you use to manage interactions between Writing Tools and your custom text view.

Declaration

protocol Delegate : NSObjectProtocol

Mentioned in

Overview

Adopt the NSWritingToolsCoordinator.Delegate protocol in the type you use to manage your custom text view. When you add a NSWritingToolsCoordinator object to your view, the coordinator uses this protocol to communicate with that view. The protocol lets Writing Tools fetch your view’s text, report suggested changes back to your view, and deliver visual feedback when Writing Tools features are active. Make sure the type that adopts this protocol has access to your view’s text storage and can perform relevant tasks on behalf of the view.

Writing Tools expects you to call the provided handler blocks at the end of your delegate methods. It’s crucial that you execute these blocks in a timely manner to allow Writing Tools to perform subsequent tasks. For example, Writing Tools waits for you to execute the handlers for animation-related methods before moving on to the next stage of the animations.

Topics

Starting a Writing Tools operation

Incorporating Writing Tools suggestions

Responding to lifecycle changes

Animating inline text changes

Displaying proofreading marks

Providing animation container views dynamically

See Also

Writing Tools for custom views