[英]How to set constraints to a tableView into a viewController?
I'm trying to place a tableView in a viewController, but im not able to constraint properly the tableView, i'm doing the usual things, i'm sticking the leading, trailing and bottom constraints to superview, and some space to the top superview. 我试图将tableView放置在viewController中,但无法正确约束tableView,我正在做平常的事情,我将前导,尾随和底部约束保留在superview上,并将一些空间保留在顶部监督。 But as shown in the preview, table view does not look to be constrained, the effect that it brings for me is that when i put elements into content view, they extend along the right side i can not see them for small devices.
但是,正如预览中所示,表视图似乎不受限制,它为我带来的效果是,当我将元素放入内容视图时,它们沿右侧延伸,对于小型设备,它们看不到它们。 Does anyone know what could be happening?
有人知道会发生什么吗?
Thanks in advance! 提前致谢!
After spending long time checking what happened i figured out that there is a Xcode fail on it, i run it in simulators and real devices and it works perfect, the bad thing is that everything i inserted into that view does not look as it should in the preview, but again, in simulator everything works fine. 在花了很长时间检查了发生了什么之后,我发现Xcode失败了,我在模拟器和真实设备中运行了它,并且效果很好,可惜的是,我插入该视图中的所有内容看起来都不像预览,但同样,在模拟器中,一切正常。 So, preview is not always as trusty as i expected and now i know it
因此,预览并不总是像我期望的那样可靠,现在我知道了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.