如何在Xcode上解决Storyboard的警告? [英] How to resolve the Storyboard's warnings on Xcode?

查看:475
本文介绍了如何在Xcode上解决Storyboard的警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Trailing(Leading) constraint is missing, which may cause overlapping with other views

我的故事板:(只需输入2个标签及其约束条件)

My storyboard: (just put 2 labels and their constraints)

避免这些警告的最佳方法是什么?

What is the best way to avoid these warnings?

推荐答案


  • 追踪提供给Hello,带世界标签!如下图所示的标签给予追踪约束常数 8(您需要的最小差距)并将关系更改为 Grater than或Equal

    • Give Trailing to Hello, Label with World! label like below image give Constant 8 (What minimum gap you need) to Trailing constraint and change Relation to Grater than or Equal.
    • 这篇关于如何在Xcode上解决Storyboard的警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆