Author Topic: About the UILabel expand!  (Read 5285 times)

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
About the UILabel expand!
« on: November 15, 2012, 12:05:27 AM »
I want to extends UILabel, i want to do the effect like hyperlink,  if i set the mark for some words of the Label, let it can get the event like (OnHover or and so on),
I just need to get the text(click point) that when the label be clicked, Can i get it?
Could you give me some suggest?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: About the UILabel expand!
« Reply #1 on: November 15, 2012, 12:44:25 AM »
You'd need to calculate that yourself. Knowing where you clicked, and the size of the printed text (UIFont.CalculatePrintedSize), you have to figure out which word you clicked on.

jarjin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: About the UILabel expand!
« Reply #2 on: March 13, 2013, 11:53:12 AM »
You'd need to calculate that yourself. Knowing where you clicked, and the size of the printed text (UIFont.CalculatePrintedSize), you have to figure out which word you clicked on.

How should I do? thank you very much!