在Xcode 10 beta上运行后,UICtackView内部出现UICollectionViewCell autolayout问题

Adr*_*ian 13 ios uicollectionviewcell swift uistackview xcode10

我的堆栈视图包含一个图像和标签,用于显示某些任务.它们都在多行上保持对齐.

我没有在Xcode 9上运行任何问题,但是当我在Xcode 10 beta 6上运行时,我遇到了一些自动布局问题,我总是会遇到堆栈视图错误:

Need constraint for X position
Need constraint for Y position
Run Code Online (Sandbox Code Playgroud)

我目前对堆栈视图的约束是:

Leading edge to cell - 5
Trailing edge to cell - 5
Bottom edge to cell - 2
Top edge to cell - 2
Run Code Online (Sandbox Code Playgroud)

所以我没有看到有什么改变抱怨这个,对我来说很明显我已经设置了X和Y.

这是两个截图,显示它运行时的标签(标签被截断)和故事板:

在此输入图像描述

在此输入图像描述

Jee*_*dhi 25

将堆栈视图嵌入UIView中.同时给出相对于UICollectionViewCell的视图约束,使其行为类似于UITableViewCell中的ContentView.