我是iOS开发新手我希望将html文本加载到textview中,其中一个超链接我的文字就像
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<p>As the name suggest itself “Trueman India” will cover icons of India. Our national Magazine “Trueman India” is an expansion to our business, it is an addition to our Trueman group of Companies. Trueman group of companies was started initially with the Diamond business with the company name DTC Diamonds and Apple Diamonds in the year 1975. Later with the growth of the company, we entered into entertainment Industry under the banner, “Trueman Entertainment” in the year 2010 and “Trueman Theatres in the year 2012. Today “TRUEMAN” group of companies consists of Trueman Entertainment, Trueman Theatres and Trueman Foundation which has been our recent discovery. Now we have come with print media called “Trueman India” a National Magazine which will cover Bollywood news, Interviews of Celebrities and some part of it would be dedicated for our real heroes “Policemen” and Politicians. </p><p> If you are interested in advertising on Trueman India, click <a href="http://www.cgim.com/advertise/" target="_safari">here</a> for ad rates and details. Your input is so important to the success of this site for you and the real true man around the world. </p>
</body>
</html>
我知道UIWebView是更好的选择但是当我使用它时,超级链接打开到不在safari中的同一个Web视图。我想要一个链接打开到safari 请给我解决方案。
答案 0 :(得分:0)
你可以捕获超链接点击动作webView:shouldStartLoadWithRequest:navigationType:并返回NO,然后打开此链接的safari