ios - UIStackView : Change UIStackView image width using storyboard

标签 ios xcode storyboard xcode7 uistackview

问题:图像占用了大部分堆栈,文本缩小了

我尝试更改内容拥抱优先级但没有任何更改!

如何使用 storyboard 在 UIStackview 中做到这一点?

我希望单元格看起来像 Eventbright 事件单元格? enter image description here enter image description here

我得到的是一张占据大部分单元格的图像?

最佳答案

代替 Fill,将 UIStackViewDistribution 更改为 Fill Proportionally 并添加宽度约束每个元素。这些约束将作为一个元素相互比例的指南,而不是固定大小。

关于ios - UIStackView : Change UIStackView image width using storyboard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33991772/

相关文章:

ios - 为 CGFloat 赋值时使用 'f' 有什么意义?

ios - 与 assetsd 的连接中断或 assetsd 死亡

ios - 在没有证书的情况下在 Xcode 4.3+ 中部署 iOS App

ios - SplitViewController DetailView 没有延伸到 TabBarController 后面

iOS 滑动抽屉

objective-c - 从 NSData 转换的 NSString 中删除 unicode 和反斜杠转义

ios - 将 pagecontroll 放在前面

ios - 在 Xcode 8/Swift 3 中按下 UIButton 时出现 "Unrecognized selector sent to instance"错误

ios - 在 iOS 7 上使用 Storyboard 从 LTR 更改为 RTL

ios - 摆脱 iOS 中的后退导航