是否可以在 iOS 7 Safari 中隐藏地址栏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18813476/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 01:11:57  来源:igfitidea点击:

Is it possible to hide the address bar in iOS 7 Safari?

javascriptiphoneiossafarimobile-safari

提问by Daimz

Is it possible to hide the address bar in iOS 7?

是否可以在 iOS 7 中隐藏地址栏?

I am currently using the below to do this in iOS 6 but I just updated xCode and tested in iPhone Sim and iOS 7 Safari is not responding to this.

我目前正在使用以下内容在 iOS 6 中执行此操作,但我刚刚更新了 xCode 并在 iPhone Sim 中进行了测试,而 iOS 7 Safari 对此没有响应。

js:

js:

window.addEventListener("load",function() {
    // Set a timeout...
    setTimeout(function(){
        // Hide the address bar!
        window.scrollTo(0, 1);
    }, 0);
});

采纳答案by valentinvieriu

It does not work anymore. Here is a very detailed article around the changes in IOS7

它不起作用了。这里有一篇非常详细的关于 IOS7变化的文章