Author Topic: How to calculate the line num of UILabel?  (Read 2432 times)

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
How to calculate the line num of UILabel?
« on: November 27, 2012, 01:04:20 AM »
If i set the  LineWidth value, How to calculate the line nums shows of UILabel?
« Last Edit: November 27, 2012, 01:15:15 AM by xiaoniaojjj »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to calculate the line num of UILabel?
« Reply #1 on: November 27, 2012, 12:30:23 PM »
UIFont.WrapText your text, then string.Count the number of '\n' in the string.