我有iOS 8的问题autolayout
.
我想要一个UITableviewCell
带有a UILabel
和5 的自定义UIImageView
.我希望图像以横向模式显示,但不能以纵向模式显示,因为这样UILabel
会被挤压缩小.
我在界面构建器中设计了视图,并添加了以下约束(以及其他):
1. priority 1000: Label width >= 120px
2. priority 1000: ImageView[1..5]
horizontal space to next one = 0px (to align them next to each
other, the rightmost image view got horizontal space = 0 to content
view to align them to the right side)
3. priority 999: ImageView[1..5]
width = 40px
4. priority 998: ImageView[1..5] width = 0px (hide image
views if the 40px constraint …
Run Code Online (Sandbox Code Playgroud)