加载相机应用程序后,iOS 8 网络应用程序屏幕缩小

标签 ios iphone web-applications web camera

我正在构建一个网络应用程序,遇到了 iOS 8 的问题。请注意,这是 iOS 8 特有的,因为它在以前的版本中运行良好。

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

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

相机应用程序按预期打开并可以毫无问题地拍照。然而,当相机应用程序关闭并返回到网络应用程序时,屏幕高度会减少一半以上。无法纠正关闭和重新启动应用程序的期望。

你可以在这里看到拍照后的样子: Screencast

看起来好像屏幕保持横向。然而,旋转设备只会使情况变得更糟。

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

最后请注意,该问题仅在作为网络应用程序运行时出现。使用 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 上看到了同样的问题。这似乎与您打开应用程序的方向有关。如果我们以纵向(垂直)模式打开应用程序,然后切换到横向(水平)模式,它工作正常。只有在横向打开应用时,视口(viewport)才会缩小。

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

拍照前: iPad before photo capture

拍照后: iPad after photo capture

关于加载相机应用程序后,iOS 8 网络应用程序屏幕缩小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26025003/

相关文章:

asp.net - .NET 应用程序服务器与 Java 应用程序服务器之间的区别

security - 不使用 cookie 的 "remember my device"的替代实现?

ios - 使用 Swift 查询可用的 iOS 磁盘空间

iphone - IOS:在后台播放应用程序时播放声音

objective-c - ios 8 iPhone 6/6+ 中的 UI 元素模糊

iphone - NSRunLoop 和 GCD 队列

ios - textField 阻止键盘显示事件

ios - Facebook Paper like 动画

iphone - 转换为通用应用程序的iPad应用程序出现在iPhone新应用程序中吗?

c# - 命名空间 'BackupSchedule' 中的“元素” 'http://schemas.microsoft.com/windowsazure' 不是预期的。需要元素 'BackupName'