如何在 WKWebView iOS 中进入全屏?

问题描述

我有一个 import { Component } from '@angular/core'; @Component({ selector: 'app-root',templateUrl: './app.component.html',styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'web-digital-clock'; ingOnInit(): void { function showTime() { var d = new Date(); var hour = d.getHours(); var min = d.getMinutes(); var sec = d.getSeconds(); var MV = "AM"; if (hour == 12) { MV = "PM"; } if (hour > 12) { hour = hour % 12; MV = "PM"; } hour = ("0" + hour).slice(-2); min = ("0" + min).slice(-2); sec = ("0" + sec).slice(-2); document.getElementById("clock").innerHTML = + hour + ":" + min + ":" + sec + " " + MV; } setInterval(showTime,1000); } } 可以打开网页。在网页上,有一个带有全屏按钮的图像。

点击全屏按钮时,图像应进入全屏模式,当图像处于全屏模式时,然后单击同一按钮图像应退出全屏模式。

它在 Chrome 和 Safari 中运行良好,但在 WKWebView 中不起作用。

如何实现WKWebView

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)