How to get the size of a NSString
Posted
by camilo
on Stack Overflow
See other posts from Stack Overflow
or by camilo
Published on 2010-04-19T16:21:56Z
Indexed on
2010/04/19
16:23 UTC
Read the original article
Hit count: 316
Hi.
A "quicky": how can I get the size (width) of a NSString?
I'm trying to see if the string width of a string to see if it is bigger than a given width of screen, case in which I have to "crop" it and append it with "...", getting the usual behavior of a UILabel. string.length won't do the trick since AAAAAAAA and iiiiii have the same length but different sizes (for example).
I'm kind of stuck.
Thanks a lot.
© Stack Overflow or respective owner