NSTextLayoutOrientationProvider Protocol Reference for iOS

Adopted by
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 7.0 and later.
Companion guide
Declared in
NSLayoutManager.h

Overview

The NSTextLayoutOrientationProvider protocol defines an interface providing the default orientation for text laid out in a conforming object, in absence of an explicit NSVerticalGlyphFormAttributeName attribute. The only UIKit class that implements this interface is NSTextContainer, whose default implementation returns NSTextLayoutOrientationHorizontal. An NSTextContainer subclass that handles vertical text could set this property to NSTextLayoutOrientationVertical to support the custom layout orientation logic.

Tasks

Getting Layout Orientation

Properties

layoutOrientation

The receiver’s layout orientation. (required)

@property(nonatomic) NSTextLayoutOrientation layoutOrientation
Discussion

This property defines the default value for the range of text laid out in the receiver in the absence of an explicit NSVerticalGlyphFormAttributeName attribute. For example, when the value of this property is NSTextLayoutOrientationVertical, the default value for NSVerticalGlyphFormAttributeName is 1. When rendering into the receiver, the text system assumes the coordinate system is appropriately rotated.

Availability
  • Available in iOS 7.0 and later.
Declared In
NSLayoutManager.h