Initializer

init(_:)

Converts a UIKit text alignment constant value to the matching constant value used by Core Text.

Declaration

init(_ nsTextAlignment: NSTextAlignment)

Parameters

nsTextAlignment

The UIKit text alignment constant you want to convert.

Return Value

The Core Text alignment that corresponds to the value specified in nsTextAlignment.

Discussion

Use this function when you need to map between the UIKit and Core Text constants for text alignment.

See Also

Text Manipulations

init(CTTextAlignment)

Converts a Core Text alignment constant value to the matching constant value used by UIKit.