A set of methods that define the orientation of text for an object.
SDKs
- iOS 7.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
Frameworks
- UIKit
- App
Kit
Declaration
protocol NSTextLayoutOrientationProvider
Overview
In macOS, the NSText
and NSText
classes adopt this protocol; in iOS, only the NSText
class implements it. An NSText
object returns the value from its associated text view when present; otherwise, it returns NSLayout
by default. If you define a custom NSText
object, you can override this method and return NSLayout
to support laying out text vertically.