Protocol

NSTextAttachmentContainer

A set of methods that defines the interface to text attachment objects from NSLayoutManager.

Topics

New Methods

func attachmentBounds(for: NSTextContainer?, proposedLineFragment: CGRect, glyphPosition: CGPoint, characterIndex: Int)

Returns the layout bounds of the text attachment to the layout manager.

Required.

func image(forBounds: CGRect, textContainer: NSTextContainer?, characterIndex: Int)

Returns the image object rendered by the layout manager in the given image bounds rectangle inside the text container.

Required.

Relationships

Inherits From

See Also

Attachments

class NSTextAttachment

The values for the attachment attributes of attributed strings and related objects.