菜鸟教程小白 发表于 2022-12-11 17:16:34

ios - 没有在 iOS 中加载正确的图像


                                            <p><p>我只是放了一个 UIImageView 并从 XIB Inspector 分配图像 <code>bgImage.png</code>。我添加了正确尺寸的所有图像,但图像未根据设备加载。</p>

<pre><code>bgImage.png (320 x 480)

[email protected] (640 x 960)

[email protected] (640 x 1136)

[email protected] (750 x 1334)

[email protected] (1242 x 2208)
</code></pre>

<p>我不想使用任何类别。
提前感谢您的帮助。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您可以通过 Image Asset 将图像设置为特定于设备。</p>

<p>关注它</p>

<p> <a href="https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/CustomizingImageSets.html" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/CustomizingImageSets.html</a> </p>

<p> <a href="/image/jQsW0.png" rel="noreferrer noopener nofollow"><img src="/image/jQsW0.png" alt="enter image description here"/></a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 没有在 iOS 中加载正确的图像,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/38969563/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/38969563/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 没有在 iOS 中加载正确的图像