简体   繁体   English

使Safari浏览器出现在iPad / iPhone应用程序中

[英]Make Safari Browser appear in iPad/iPhone App

I have an app that I am in the process of writing and I want too have a button on the screen that the user can press to go to a web page in safari. 我有一个应用程序,我正在写作,我想在屏幕上也有一个按钮,用户可以按下来访问Safari中的网页。 I do not want to use the UIWebView control and make my own browser, I just want the screen to switch to Safari. 我不想使用UIWebView控件并制作我自己的浏览器,我只想让屏幕切换到Safari。

Can any give me some tips how to do this? 可以给我一些提示如何做到这一点?

你应该能够这样做:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.google.com"]];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM