gpt4 book ai didi

ios - 无法更改 UITableViewCell 中 UIImageView 的宽度和高度 - swift

转载 作者:行者123 更新时间:2023-11-28 14:15:23 25 4
gpt4 key购买 nike

我的 UIViewController 有以下布局,它也有一个 UITableView。我试图更改 UITableViewCell 中 UIImageView 的宽度和高度,但没有成功。我一直在使用 Storyboard 来更改宽度和高度,但没有成功。无论我尝试增加或减小任何尺寸,图像大小都保持不变(就像我在模拟器上安装应用程序时一样——图像的大小始终相同)

布局:

enter image description here

看起来像这样:

enter image description here

UIImageView 的约束:

enter image description here

宽度:

enter image description here

高度:

enter image description here

最佳答案

您需要单击宽度和高度约束并更改它们在示例中的常量值从 20 更改为任何值,但是从尺寸检查器或通过拖动 imageView 的一侧您不会得到任何东西,因为您不能拥有同时自动布局和框架

enter image description here

关于ios - 无法更改 UITableViewCell 中 UIImageView 的宽度和高度 - swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52226003/

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