iOS Developer Library

Developer

UIKit Framework Reference NSTextLayoutOrientationProvider Protocol Reference for iOS

Options
Deployment Target:

On This Page
Language:

NSTextLayoutOrientationProvider

Inherits From


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 7.0 and later

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.

  • The receiver’s layout orientation. (required)

    Declaration

    Swift

    var layoutOrientation: NSTextLayoutOrientation { get set }

    Objective-C

    @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.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 7.0 and later