Determines the frame size needed for a string range.
- iOS 3.2+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Text
The framesetter used for measuring the frame size.
The string range to which the frame size applies. The string range is a range over the string used to create the framesetter. If the length portion of the range is set to
0, then the framesetter continues to add lines until it runs out of text or space.
Additional attributes that control the frame filling process, or
NULLif there are no such attributes.
The width and height to which the frame size is constrained. A value of
CGFLOATfor either dimension indicates that it should be treated as unconstrained.
On return, contains the range of the string that actually fit in the constrained size.
The actual dimensions for the given string range and constraints.
This function can be used to determine how much space is needed to display a string, optionally by constraining the space along either dimension.