约束两个UIViews之间添加更多空间 [英] Constraint to add more space between two UIViews

查看:144
本文介绍了约束两个UIViews之间添加更多空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用X code 4.5.2和最新的SDK的iPhone应用程序。

I'm developing an iPhone application with XCode 4.5.2 and latest SDK.

现在我使用的自动布局一个故事板工作,并与iPhone 4S和iPhone 5。

Now I'm using Autolayout to work with one storyboard and use it with iPhone 4S and iPhone 5.

这是你怎么能配备Retina 3.5外形看出来:

This is how can you see it with Retina 3.5 form factor:

这是你怎么能配备Retina 4外形看出来:

And this is how you can see it with Retina 4 form factor:

我需要的托多斯洛杉矶establecimientos 托多斯洛杉矶产品之间添加更多空间。而且,托多斯洛杉矶产品 POR DISTANCIA>

I need to add more space between Todos los establecimientos and Todos los products. And also, between Todos los products and Por distancia >.

托多斯洛杉矶establecimientos 托多斯洛杉矶产品现在有一个顶层空间至:上海华约束

我怎样才能做到这些元素之间添加更多空间,当我使用的Retina 4的外形?

推荐答案

这可以通过约束与小于1.0优先完成。
要创建一个约束之间的2次同时选中,并在界面生成器的右下角单击约束按钮,选择在这种情况下,垂直间距需要约束。

This can be done via a constraint with less than 1.0 Priority. To create a constraint between 2 views select both and click on the constraint button in the lower right corner of the interface builder to select the constraint you need in this case vertical spacing..

Raywenderlich有一个很好的教程:
第1部分
2 部分

Raywenderlich has a good tutorial on this: Part 1 Part 2

或阅读文档苹果:
<一href=\"https://developer.apple.com/library/ios/recipes/x$c$c_help-interface_builder/articles-autolayout/UnderstandingAutolayout.html\"相对=nofollow>苹果直营店 - 理解约束

这篇关于约束两个UIViews之间添加更多空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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