Contents

NSTextAttachmentViewProvider

A container object that associates a text attachment at a particular document location with a view object.

Declaration

class NSTextAttachmentViewProvider

Overview

Use NSTextAttachmentViewProvider when you need to represent document locations in terms of an NSTextLocation or an NSTextRange or you want to support view-based text attachments. The view provider controls the view placement and layout without requiring view classes to be aware of the text attachment coordination using a NSTextLayoutManager in macOS 12 or iOS 15 and later.

Topics

Initializing a text attachment view

Defining the contents

Defining a custom view hierarchy

Determining the Attachment’s Bounds

See Also

Attachments