iDevGames Forums

Full Version: find the rect.size.height that contains nsstring given the rect.size.x
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i'd like to make a popup that has dimension size.y variable and size.x fixed.
there is a method that find how much must be the y that contains all the text?
I assume it's a custom popup…

At any rate, to find the height of a string, use NSAttributedString's boundingRectWithSize:options: method, with the option NSStringDrawingUsesLineFragmentOrigin, and size {fixedWidth, maxHeight}
Reference URL's