Contents

size()

Returns the size necessary to draw the string.

Declaration

func size() -> CGSize

Return Value

The minimum size required to draw the entire contents of the string.

Discussion

You can use this method prior to drawing to compute how much space is required to draw the string.

This method may return fractional sizes. When setting the size of your view, use the ceil function to round fractional values up to the nearest whole number.

See Also

Related Documentation

Getting metrics for the string