Contents

textSize

The two-dimensional extent of the text after layout.

Declaration

var textSize: CGSize { get }

Discussion

This property reports the size of the smallest bounding rectangle containing the text.

This size does not necessarily match that of the layout rectangle specified by the containerFrame property. A long body of text may overflow the layout rectangle, depending on the values of the isWrapped and truncationMode properties, and a short string of text may fit in an area smaller than the layout rectangle.

See Also

Managing Text Layout