find the rect.size.height that contains nsstring given the rect.size.x
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?
thanks
there is a method that find how much must be the y that contains all the text?
thanks
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}
At any rate, to find the height of a string, use NSAttributedString's boundingRectWithSize:options: method, with the option NSStringDrawingUsesLineFragmentOrigin, and size {fixedWidth, maxHeight}
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Malloc() Struct with NSString Inside? | Graphic Ace | 3 | 6,680 |
Jan 26, 2010 05:32 PM Last Post: mysteriouspants |
|
Finding the height of a point on a given list of vertexes? | mikey | 10 | 9,153 |
Jan 4, 2010 05:36 AM Last Post: mikey |
|
Can't use NSString to put a number on screen? | kensuguro | 3 | 6,609 |
Nov 7, 2005 01:16 AM Last Post: Jordan |
|
Getting Number From Character In NSString | Nick | 2 | 5,870 |
Oct 31, 2005 10:08 AM Last Post: Nick |
|
Texturing height map problems | nahid | 6 | 6,086 |
Oct 14, 2005 10:24 PM Last Post: hangt5 |