小编arc*_*cud的帖子

iOS 8 - AutoLayout问题 - UITableViewCell内的UIImageView忽略宽度约束

我有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)

objective-c uiimageview ios autolayout ios8

6
推荐指数
1
解决办法
3089
查看次数

标签 统计

autolayout ×1

ios ×1

ios8 ×1

objective-c ×1

uiimageview ×1