Is there a way to create custom UIDataDetectorTypes?
Posted
by KingAndrew
on Stack Overflow
See other posts from Stack Overflow
or by KingAndrew
Published on 2010-03-01T19:08:58Z
Indexed on
2010/03/12
15:37 UTC
Read the original article
Hit count: 366
iphone
Hi All, What I am trying to do is create tooltip functionality so that certain words in my instructional app can be tapped and the definition pops up. For the popup part I plan on using code from “AFInformationView” which provides bubbles on the iPhone.
The part I'm struggling with is how to associate A particular word's location with the bubble. Currently I have the text on a UILabel that is on a custom UITableCell. Since I calculate the row height on the fly with:
[textToUse sizeWithFont:[UIFont systemFontOfSize:FONT_SIZE] constrainedToSize:CGSizeMake(stop-start, 500)];
I'm not sure what the coordinates for a specific word will be. I was thinking that if I created a custom DataDetectorType that could be the fix.
If anyone knows how to do this or has any other ideas I would be happy to hear them.
Thanks,
Andrew
© Stack Overflow or respective owner