Author Topic: Getting the current Line WIDTH in pixels not max LIne width  (Read 3056 times)

sk1989

  • Guest
Getting the current Line WIDTH in pixels not max LIne width
« on: November 27, 2012, 01:57:31 PM »
YES, I saw all the posts in the thread regarding this issue but none of them actually help and have a proper solution.

I need to know how i can get the current line width of a UILABEL not max line width thats get set in the inspector.

here is wat i am doing right now to get it

UILABEL.font.CalculatePrintedSize(UILABEL.text,true,UIFont.SymbolStyle.None).x * UILABEL.transform.localScale.x)

when i debug this i am gettting the line width but when i assign this to the transform position , its turning out to be zero.



sk1989

  • Guest
Re: Getting the current Line WIDTH in pixels not max LIne width
« Reply #1 on: November 27, 2012, 04:30:08 PM »
nvm it works now using UILabel.relativeSize