HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了加载相机应用后,iOS 8网络应用程序屏幕缩小大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在构建一个Web应用程序,并遇到iOS 8的问题.请注意这是特定于iOS 8,因为它在以前的版本中工作正常.

我有一个页面可以上传直接从手机或平板电脑拍摄的图像.我使用以下链接调用相机应用程序:

<input type="file" accept="image/*" capture="camera" name="files[]">

相机应用程序按预期打开并拍摄照片没有问题.但是,当相机应用程序关闭并返回到Web应用程序时,屏幕高度会减少一半以上.没有办法纠正关闭和重新启动应用程序的期望.

在这里拍照后你可以看到它的外观:
Screencast

看起来好像屏幕仍处于横向状态.然而,旋转设备只会使情况变得更糟.

我假设这是一个iOS 8错误,但想知道是否有人对如何纠正或解决问题有任何想法.

最后一点,只有在作为Web应用程序运行时才会出现此问题.使用safari时它可以工作.

仅供参 – 这是我正在使用的元标记

<!-- Run in full-screen mode. -->
        <Meta name="apple-mobile-web-app-capable" content="yes">
        <Meta name="mobile-web-app-capable" content="yes">

        <!-- Make the status bar black with white text. -->
        <Meta name="apple-mobile-web-app-status-bar-style" content="black">

        <!-- Customize home screen title. -->
        <Meta name="apple-mobile-web-app-title" content="DigiSite">

        <!-- Disable phone number detection. -->
        <Meta name="format-detection" content="telephone=no">

        <!-- Set viewport. -->
        <Meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">

        <!-- Startup images -->

        <!-- iOS 6 & 7 iPad (reTina,porTrait) -->
        <link href="http://img.digisite.us/splash.png?w=1536&h=2008&c=<br />
<b>Notice</b>:  Undefined index: BACkground in <b>/home5/digisite/public_html/mobile/mobileHeader.PHP</b> on line <b>22</b><br />
&n=lumentum"
        media="(device-width: 768pX) and (device-height: 1024pX)
        and (orientation: porTrait)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPad (reTina,landscapE) -->
        <link href="http://img.digisite.us/splash.png?w=1496&h=2048&c=&n=lumentum"
        media="(device-width: 768pX) and (device-height: 1024pX)
        and (orientation: landscapE)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 iPad (porTrait) -->
        <link href="http://img.digisite.us/splash.png?w=768&h=1004&c=&n=lumentum"
        media="(device-width: 768pX) and (device-height: 1024pX)
        and (orientation: porTrait)
        and (-webkit-device-pixel-ratio: 1)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 iPad (landscapE) -->
        <link href="http://img.digisite.us/splash.png?w=748&h=1024&c=&n=lumentum"
        media="(device-width: 768pX) and (device-height: 1024pX)
        and (orientation: landscapE)
        and (-webkit-device-pixel-ratio: 1)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPhone 5 -->
        <link href="http://img.digisite.us/splash.png?w=640&h=1096&c=&n=lumentum"
        media="(device-width: 320pX) and (device-height: 568pX)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPhone (reTina) -->
        <link href="http://img.digisite.us/splash.png?w=640&h=920&c=&n=lumentum"
        media="(device-width: 320pX) and (device-height: 480pX)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

先谢谢你.

解决方法

我在运行iOS8的iPad 2上看到了同样的问题.它似乎与您打开应用程序的方向有关.如果我们以纵向(垂直)模式打开应用程序,然后切换到横向(水平)它工作正常.只有在横向打开应用程序时,视口才会缩小.

我无法在iOS7上重现此问题.

拍照前:

拍照后:

大佬总结

以上是大佬教程为你收集整理的加载相机应用后,iOS 8网络应用程序屏幕缩小全部内容,希望文章能够帮你解决加载相机应用后,iOS 8网络应用程序屏幕缩小所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。