Protocol

NSTextLayoutOrientationProvider

A set of methods that define the orientation of text for an object.

Declaration

protocol NSTextLayoutOrientationProvider

Overview

In macOS, the NSTextContainer and NSTextView classes adopt this protocol; in iOS, only the NSTextContainer class implements it. An NSTextContainer object returns the value from its associated text view when present; otherwise, it returns NSLayoutManager.TextLayoutOrientation.horizontal by default. If you define a custom NSTextContainer object, you can override this method and return NSLayoutManager.TextLayoutOrientation.vertical to support laying out text vertically.

Topics

Getting Layout Orientation

var layoutOrientation: NSLayoutManager.TextLayoutOrientation

The default layout orientation.

Required.

Relationships

Conforming Types

See Also

Layout

class NSLayoutManager

An object that coordinates the layout and display of characters held in an NSTextStorage object.

protocol NSLayoutManagerDelegate

A set of optional methods implemented by delegates of NSLayoutManager objects.