如何在iPad的全屏模式下使用SAFARI打开网站 [英] how to open a website using SAFARI in fullscreen mode for iPad
问题描述
我有一个要求,网站(网址是硬编码的)将以全屏模式打开
I am having a requirement where a website ( url is hardcoded )would be getting open in full-screen mode
即没有地址bar或SAFARI的菜单栏按钮应该显示在我的应用程序中。
i.e. No address bar or No menu-bar buttons of SAFARI should be displayed in my application.
我在SAFARI浏览器中使用以下代码行打开URL。
I am using following lines of code for the opening url in SAFARI browser.
NSURL *url=[[NSURL alloc]initWithString:@"http//www.google.com"];
[[UIApplication sharedApplication] openURL:url];
我应为 UIApplication
设置哪些属性我将在我的应用程序中以全屏模式获取SAFARI浏览器?
what properties shall I set for UIApplication
so that I will get the SAFARI browser in full-screen mode in my app?
推荐答案
您无法从应用程序执行此操作,由网站尝试执行此操作。为了实现你所追求的目标,我相信你需要让网站假装成一个网络应用程序。
You can't do this from the Application, it is up to the website to try and enforce this. In order to achieve what you're after, I believe you need to make the website pretend to be a web-app.
Apple有关于如何自定义Safari的文档您的网站,请参阅 http:// developer。 apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/configuringwebapplications/configuringwebapplications.html ,特别是隐藏Safari用户界面组件
Apple have documentation on how to customize Safari for your website, see http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/configuringwebapplications/configuringwebapplications.html, specifically "Hiding Safari User Interface Components"
这篇关于如何在iPad的全屏模式下使用SAFARI打开网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!