Instance Method

replaceLayoutManager(_:)

Replaces the layout manager for the group of text system objects containing the receiver.

Declaration

func replaceLayoutManager(_ newLayoutManager: NSLayoutManager)

Parameters

aLayoutManager

The new layout manager.

Discussion

All text containers and text views attached to the old layout manager are reassigned to the new layout manager. Unlike setting the layoutManager property directly, this method makes all the adjustments necessary to keep the text object relationships intact.

See Also

Managing Text Components

var layoutManager: NSLayoutManager?

The receiver’s layout manager.

var textView: NSTextView?

The receiver’s text view.