Display link which lanuchs safari

Discussion in 'iOS Programming' started by goedsole, May 17, 2010.

  1. goedsole macrumors newbie

    Apr 21, 2010
    Dear Y'all -

    I want to display a static bit of text (e.g. "Google") such that the user can tap the text and cause safari to launch and display web content for a particular URL (e.g. http://www.google.com).

    I don't want to display the content in my app like UIWebView does, and I don't want the text to be the URL itself like UITextView does with the data detector stuff.

    It seems impossible that there's not a simple way to do this.

    - Billy
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    So how do you want to display the text? You could use a UILabel, detect the touch and launch the URL yourself.
  3. goedsole thread starter macrumors newbie

    Apr 21, 2010
    That'll work.

    So a series of UILables with text colored blue will definitely work. Thanks.

    It surprises me that the data detector stuff in UITextView doesn't have some syntax that allows you to specify text that's visible separate from the URL, but ...

    - Billy

Share This Page