【问题标题】:Which iPhone apps will run on the iPad 2 in scaled mode?哪些 iPhone 应用程序可以在 iPad 2 上以缩放模式运行?
【发布时间】:2013-01-23 09:45:48
【问题描述】:

我没有 iPad 2,因此无法对此进行测试。假设我开发了一个只使用视网膜图像的应用程序,因为我让它只兼容 iPhone 4 以上。它们会在 iPad 2 上以缩放模式运行吗?从技术上讲,iPad 2 非视网膜显示屏的分辨率要大于 iPhone 4 视网膜显示屏。但我不确定它会如何显示。有人测试过吗?

【问题讨论】:

    标签: iphone ios compatibility retina-display ipad-2


    【解决方案1】:

    应用程序将在信箱中运行,缩放大小。

    【讨论】:

      【解决方案2】:

      它看起来与在 iPad 上运行的非视网膜 iPhone 应用程序相同,即看起来像屏幕中间的 iPhone。 “视网膜”像素被下采样到较低的分辨率,如果你点击“2x”按钮,下采样像素的大小只会加倍以适应屏幕,尽管理论上它们可以与 iPad 的 1-1 映射像素。

      【讨论】:

        【解决方案3】:

        我目前正在开发一个 HTML5 应用程序,并且我使用 CSS 媒体查询来定位不同的设备,这是我的代码示例:-


            <!-- iPhone -->
            <link rel="apple-touch-icon" media="screen 
            and (resolution: 163dpi)" href="~/content/images/iOS-57.png" />
        
            <!-- iPad (portrait) --><!-- iPad (landscape) -->
            <link rel="apple-touch-icon" sizes="72x72" href="~/content/images/iOS-72.png" />
        
            <!-- iPad (Retina, portrait) --><!-- iPad (Retina, landscape) -->
            <link rel="apple-touch-icon" sizes="144x144" href="~/content/images/iOS-144.png" />
        
            <!-- iPhone (Retina) -->
            <link rel="apple-touch-icon" sizes="114x114" href="~/content/images/iOS-114.png" />
        
            <!-- iPhone -->
            <link href="~/content/images/apple-touch-startup-image-320x460.png"
                  media="(device-width: 320px) and (device-height: 480px)
                     and (-webkit-device-pixel-ratio: 1)"
                  rel="apple-touch-startup-image">
            <!-- iPhone (Retina) -->
            <link href="~/content/images/apple-touch-startup-image-640x920.png"
                  media="(device-width: 320px) and (device-height: 480px)
                     and (-webkit-device-pixel-ratio: 2)"
                  rel="apple-touch-startup-image">
            <!-- iPhone 5 -->
            <link href="~/content/images/apple-touch-startup-image-640x1096.png"
                  media="(device-width: 320px) and (device-height: 568px)
                     and (-webkit-device-pixel-ratio: 2)"
                  rel="apple-touch-startup-image">
            <!-- iPad (portrait) -->
            <link href="~/content/images/apple-touch-startup-image-768x1004.png"
                  media="(device-width: 768px) and (device-height: 1024px)
                     and (orientation: portrait)
                     and (-webkit-device-pixel-ratio: 1)"
                  rel="apple-touch-startup-image">
            <!-- iPad (landscape) -->
            <link href="~/content/images/apple-touch-startup-image-748x1024.png"
                  media="(device-width: 768px) and (device-height: 1024px)
                     and (orientation: landscape)
                     and (-webkit-device-pixel-ratio: 1)"
                  rel="apple-touch-startup-image">
            <!-- iPad (Retina, portrait) -->
            <link href="~/content/images/apple-touch-startup-image-1536x2008.png"
                  media="(device-width: 768px) and (device-height: 1024px)
                     and (orientation: portrait)
                     and (-webkit-device-pixel-ratio: 2)"
                  rel="apple-touch-startup-image">
            <!-- iPad (Retina, landscape) -->
            <link href="~/content/images/apple-touch-startup-image-1496x2048.png"
                  media="(device-width: 768px) and (device-height: 1024px)
                     and (orientation: landscape)
                     and (-webkit-device-pixel-ratio: 2)"
                  rel="apple-touch-startup-image">
        

        【讨论】:

          【解决方案4】:

          如果您希望您的应用程序看起来像 ipad 应用程序,您需要在目标配置中添加通用属性。如果目标只是 Iphone,它将始终显示在小窗口中。

          【讨论】:

            猜你喜欢
            • 2012-11-04
            • 1970-01-01
            • 2013-02-14
            • 2013-02-22
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多