Welcome,
Guest
. Please
login
or
register
.
June 09, 2026, 09:51:38 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UILabel get current line height?
« previous
next »
Print
Pages: [
1
]
Author
Topic: UILabel get current line height? (Read 3585 times)
newwork01
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 5
UILabel get current line height?
«
on:
May 24, 2016, 05:20:17 AM »
how to get current line height of the text in UILabel?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UILabel get current line height?
«
Reply #1 on:
May 24, 2016, 04:45:20 PM »
Number of lines:
label
.
processedText
.
Count
(
"
\n
"
)
;
Height in pixels:
label
.
height
Logged
newwork01
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 5
Re: UILabel get current line height?
«
Reply #2 on:
May 24, 2016, 09:13:23 PM »
i mean current height of 1 single line in UILabel, not all line of the text.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UILabel get current line height?
«
Reply #3 on:
May 26, 2016, 11:30:40 AM »
UILabel.fontSize for the base value, UILabel.finalFontSize for the scaled value (when the font gets shrunk via the "fit" option)
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UILabel get current line height?