PDA

View Full Version : tappable text like in Mail.app




mraheel
Nov 1, 2009, 03:08 PM
i was trying out to do something like making a particular Word in a label to dynamically highlight and become tappable.

Like once you type the email address in Mail.app. It is then covered in lightblue and upon tap, open up contacts.

If a UILabel has text @"Oh man, these apples are yellow";
At runtime, i want the "apples" to become kinda highlighted.. and become tappable.. kinda like how we have our html tags but having nothing to do with the internet.

Maybe if i find a way to detect apples and then make it tappable with highlighted text etc. using tags like @"Oh man, these $apples$ are yellow";

Things within $ will be selected and shown..

Im confused how to go about it though..



PhoneyDeveloper
Nov 1, 2009, 09:05 PM
Look at the souce for three20. They have labels that can include tappable links. You can either use it as is or adapt the code for your purposes.

mraheel
Nov 2, 2009, 02:22 AM
thanks man, i'll check it out, im looking at it..