开发者

how to naviagate html url to other window

开发者 https://www.devze.com 2022-12-16 07:02 出处:网络
Special thanks in advance for sending me answer........ I m the beginner in iphone development.I was calling html page in the 开发者_运维百科UISegment Controller.The url in that page html page is ope

Special thanks in advance for sending me answer........ I m the beginner in iphone development. I was calling html page in the 开发者_运维百科UISegment Controller.The url in that page html page is open in the same page. In html page i wrote the following code

<a href="http://google.com">www.google.com</a>

But it open that url in UISegment Control of WebView on same page. I want that url open in new page of safari browser in iphone.


You can assign a delegate to your web view.

In the delegate's class, implement -webView:shouldStartLoadWithRequest:navigationType:. Then use UIApplication's -openURL: to close the app and open the page in MobileSafari.


<A HREF="www.google.com" TARGET="_blank">google in a new window</A>
0

精彩评论

暂无评论...
验证码 换一张
取 消