简体   繁体   English

iOS Web App:使用向后滑动手势返回

[英]iOS Web App: Use back swipe gesture to go back

I adapted my website according to the official guide over at我根据官方指南调整了我的网站

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

Since I made the changes my website looks like an app when I add it as a bookmark to the homescreen.由于我进行了更改,因此当我将其作为书签添加到主屏幕时,我的网站看起来像一个应用程序。 However, my web app relies on the go-back button/gesture even if there is no page refresh.但是,即使没有页面刷新,我的 Web 应用程序也依赖于返回按钮/手势。 But the gesture does not work out of the box.但是这个手势不是开箱即用的。 What can I do to activate it?我该怎么做才能激活它? I read that iOS 12.2 should support the gesture.我读到 iOS 12.2 应该支持手势。

This should work when you set your display to standalone in your webmanifest.当您在 webmanifest 中将display设置为standalone时,这应该可以工作。

Checkout this link for more documentation: https://developer.mozilla.org/en-US/docs/Web/Manifest#display查看此链接以获取更多文档: https : //developer.mozilla.org/en-US/docs/Web/Manifest#display

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

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