有没有办法将所有约束从一个元素复制到另一个元素?

发布于 2025-02-06 12:23:32 字数 200 浏览 1 评论 0原文

情况:我的故事板上有一个图像,其中还有许多其他元素用于相对定位(约束)。我需要将此图像替换为具有其他内容的视图,而不会弄乱布局。因此,我希望能够复制所有当前影响图像的约束,并使其影响新视图。

这可能吗?我试图根据影响图像的约束来对此视图进行新的约束来手动浏览它,但是当所有设置和完成时,布局仍然混乱。我猜想我错过了某个地方的约束,它正在抛弃布局工具。

谢谢!

Situation: I have an image on my storyboard that has a lot of other elements using it for relative positioning (constraints). I need to replace this image with a view that will have other content, without messing with the layout. Thus, I want to be able to copy all the constraints that currently affect the image, and make it affect the new view instead.

Is this possible? I tried to go through it manually by making new constraints for this view according to the constraints that affected the image, but the layout was still messed up when all was set and done. I'm guessing I missed a constraint somewhere and it's throwing off the layout tool.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文