How to add hyperlink in iPhone app?

后端 未结 5 2071
无人共我
无人共我 2020-12-09 22:13

In my iPhone app, I require to show the hyperlink to a website

How can I add hyperlink for a website in iPhone programming?.

Actually i want to pass the lin

5条回答
  •  囚心锁ツ
    2020-12-09 23:03

    Drag a textView in your View Controller and select it's attribute inspector:

    1. Set your text as "My website: www.mywebsitelink.com" and make sure that text type should be plain.
    2. Tick your behavior as Selectable and not Editable.
    3. Tick on detection as Links.

    Run your project. You can see link in View Controller. Click on link, that will take you to safari and open a new tab on it.

提交回复
热议问题