今天写一个新的layout,想着用design模式进行拖拽写,但是拖得很完美,最后报错:
This view is not constrained, it only has designtime positions, so it will jump to (0,0) unless you add constraints.
意思就是:
此视图不受约束,它只有设计时位置,因此除非添加约束,否则它将跳转到(0,0)
因此对它添加约束,使用“infer Constrains”按钮就可以了。
如图所示:
![](https://img.haomeiwen.com/i13625047/9024535e21295343.png)
网友评论