gpt4 book ai didi

ios - UITableViewCell ImageView 在 iPhone X 上太大

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:22:07 24 4
gpt4 key购买 nike

我正在使用 Storyboard 并为我的 UITableViewCell 设置一个 UIImageView。我有图像的 @2x 和 @3x 版本,分别为 50x50 和 100x100。

这看起来是我希望它在 iPhone 6、7、8 上的样子:

enter image description here

iPhone X:

enter image description here

如您所见,iPhone X 上的图标要大得多。(我知道 X 上的屏幕更大,但图标显然要大得多)。

关于如何解决这个问题有什么想法吗?

最佳答案

我认为问题出在您的图片资源的大小上。

I have a @2x and @3x version of the image, at 50x50 and 100x100.

但是 @3x 资源的宽度和高度应该比它们的 @2x 对象大 1.5 倍,而不是大 2 倍。因此,如果您的 50x50 @2x Assets 正确显示,您的 @3x Assets 应该是 75x75,而不是 100x100。

关于ios - UITableViewCell ImageView 在 iPhone X 上太大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47211816/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com