Author Topic: Size of UILabel  (Read 1781 times)

Warka0OO

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
Size of UILabel
« on: September 09, 2013, 12:18:40 PM »
Hi everyone ! :)

I clearly didn't find the real size of the UILabel. relativeSize and lineWidth aren't the correct values for the real size of the label.
Where can i get this ?

ex:
     
     
Label                                                                      o
^                                                                          ^
start position with pivot left                                       position relativeSize or lineWidth on X
      ^
      the X value i want

Thx !

Warka0OO

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Size of UILabel
« Reply #1 on: September 10, 2013, 02:39:43 AM »
Soooooo stupid boy.  ;D

NGUIMath.CalculateWidgetCorners(label)[3]   <---- if you need

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Size of UILabel
« Reply #2 on: September 10, 2013, 07:01:05 AM »
In NGUI 3.0 the same code will be label.corners[3]. However note that this gives you the position of the bottom-right corner, not the label's size.