init(_:)
Converts a UIKit text alignment constant value to the matching constant value that Core Text uses.
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.