Instance Method

layoutManager(_:textContainer:didChangeGeometryFrom:)

Sent right before the layout manager invalidates layout due to the text container changing geometry.

Declaration

iOS, Mac Catalyst, tvOS
optional func layoutManager(_ layoutManager: NSLayoutManager, textContainer: NSTextContainer, didChangeGeometryFrom oldSize: CGSize)
macOS
optional func layoutManager(_ layoutManager: NSLayoutManager, textContainer: NSTextContainer, didChangeGeometryFrom oldSize: NSSize)

Parameters

layoutManager

The layout manager invalidating layout.

textContainer

The text container that changed geometry.

oldSize

The size of the text container before it changed geometry.

Discussion

The delegate can react to the geometry change and perform adjustments such as recreate an exclusion path.

See Also

Handling Layout for Text Containers

func layoutManager(NSLayoutManager, didCompleteLayoutFor: NSTextContainer?, atEnd: Bool)

Informs the delegate that the given layout manager has finished laying out text in the given text container.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software