Class

CATextLayer

The CATextLayer provides simple text layout and rendering of plain or attributed strings. The first line is aligned to the top of the layer.

Overview

Symbols

Getting and Setting the Text

var string: Any?

The text to be rendered by the receiver.

Text Visual Properties

var font: CFTypeRef?

The font used to render the receiver’s text.

var fontSize: CGFloat

The font size used to render the receiver’s text. Animatable.

var foregroundColor: CGColor?

The color used to render the receiver’s text. Animatable.

Text Alignment and Truncation

var isWrapped: Bool

Determines whether the text is wrapped to fit within the receiver’s bounds.

var alignmentMode: String

Determines how individual lines of text are horizontally aligned within the receiver’s bounds.

var truncationMode: String

Determines how the text is truncated to fit within the receiver’s bounds.

Constants

Truncation modes

These constants are used by the truncationMode property.

Horizontal alignment modes

These constants are used by the alignmentMode property.

Relationships

Inherits From

Conforms To