Sorry my question was not detailed enough and is not exactly what I'm trying to do. I am using a text storage, layout manager and a text container. The solution is to use the layout manager to determine the rectangle that bounds the rect. Here is the code.
Send the string a
sizeWithAttributes:
message, passing a dictionary containing the attributes with which you want to measure the string.Sorry my question was not detailed enough and is not exactly what I'm trying to do. I am using a text storage, layout manager and a text container. The solution is to use the layout manager to determine the rectangle that bounds the rect. Here is the code.
Using the UILabel's attributed string:
Just in case you are wondering how to check a label size, you should use the UIFont, instead of the NSFont (not even sure if exists)
Here's a relatively simple approach. Just create an NSAttributedString with the appropriate font and ask for its size: