tappable text like in Mail.app

Discussion in 'iOS Programming' started by mraheel, Nov 1, 2009.

  1. mraheel macrumors regular

    Apr 18, 2009
    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..
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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.
  3. mraheel thread starter macrumors regular

    Apr 18, 2009
    thanks man, i'll check it out, im looking at it..

Share This Page