[英]Custom view with intrinsic content size in uistackview
A custom view with overridden intrinsicContentSize property is added to a UIStackView 具有覆盖的internalContentSize属性的自定义视图被添加到UIStackView
override var intrinsicContentSize: CGSize {
return CGSize(width: 100, height: 44)
}
Although the custom view is drawn successfully in the simulator, I still want to get rid of this storyboard error message. 尽管自定义视图已在模拟器中成功绘制,但我仍然希望摆脱此故事板错误消息。 Thank you
谢谢
It looks like you are missing the constraint of the stack view not the view added to the stack. 似乎您缺少堆栈视图的约束,而不是添加到堆栈的视图的约束。 Check the constraints of the stack.
检查堆栈的约束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.