簡體   English   中英

哪些iPhone應用程序將以縮放模式在iPad 2上運行?

[英]Which iPhone apps will run on the iPad 2 in scaled mode?

我沒有iPad 2,因此無法測試。 假設我已經開發了一個僅使用視網膜圖像的應用程序,因為我使其僅與iPhone 4兼容。 它們會在縮放模式下在iPad 2上運行嗎? 從技術上講,iPad 2非視網膜顯示屏的分辨率大於iPhone 4視網膜顯示屏。 但是我不確定它將如何顯示。 有人測試過嗎?

該應用程序將在信箱中按比例運行。

它看起來與在iPad上運行的非視網膜iPhone應用程序相同,即在屏幕中間看起來像iPhone。 將“視網膜”像素下采樣到較低的分辨率,如果您按“ 2x”按鈕,則下采樣像素的大小只是屏幕尺寸的兩倍,即使從理論上講它們可以與iPad的1-1映射。像素。

我目前正在使用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">

如果要讓您的應用程序看起來像ipad應用程序,則需要在目標配置中添加通用屬性。 如果目標僅是Iphone,它將始終顯示在小窗口中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM