Use Xcode Auto Layout for different image sizes on iPhone(在 iPhone 上为不同的图像尺寸使用 Xcode 自动布局)
问题描述
使用纵向 iPhone 的自动布局,我不希望 iPhone 6+ 上的游戏角色的 UIImageViews 大小与 iPhone 4S 中的完全相同.4S字要小一些,否则会显得太大.使用 Auto Layout 如何更改 iPhone 之间的图像大小,因为它们似乎都更改为相同大小而不受约束.
With Auto Layout for iPhones in Portrait, I don't want the exact same size UIImageViews for game characters on iPhone 6+ as in iPhone 4S. The 4S characters need to be smaller or else they'll look too big. Using Auto Layout how do I change image sizes between iPhones because they seem like they all change to be the same sizes regardless of constraints.
推荐答案
我确信它们会更小,因为当您添加图像时,您会添加 3 种尺寸的图像:@1x、@2x 和 @3x.这些图像使该图像适用于所有 Apple 设备.在您的模拟器中试用它们.
I am sure that they would be smaller because when you add images, you add 3 sizes of the image: @1x, @2x, and @3x. These images make the image universal for all Apple devices. Try them out in your simulator.
这篇关于在 iPhone 上为不同的图像尺寸使用 Xcode 自动布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 iPhone 上为不同的图像尺寸使用 Xcode 自动布局
基础教程推荐
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
