Cocoanetics/DTCoreText — Issue #114: Get size for attributed string w/out rendering
Author: sbeigel
Created: 2012-01-25 12:24:02+00:00
State: open

Is there a way to get the size (eventually constrained by width, height, ...) for an attributed string without rendering it using a DTAttributedTextContentView?

Right now I can see 2 approaches: Construct content views and cache them (like in the DTCoreText demo app) or construct content views and discard them (use them only for measuring).

It would be great if you could call a method on the attributed string to find out it's resulting size w/out actually drawing (hidden or not).