简体   繁体   English

XCode:故事板在元素之间添加了额外的空间?

[英]XCode: Storyboard adds extra spaces between elements?

I have this ViewController in my app's Storyboard:我在我的应用程序的故事板中有这个 ViewController:

在此处输入图片说明

There's an category image and then under it there's the category title.有一个类别图像,然后在它下面是类别标题。

When i test the app, the storyboard adds extra spaces at the top and bottom of the category title like this:当我测试应用程序时,故事板会在类别标题的顶部和底部添加额外的空格,如下所示:

在此处输入图片说明

How can i remove the extra space!?我怎样才能删除多余的空间!?

EDIT编辑

This is the structure:这是结构: 在此处输入图片说明

I think this has been because of the constraints used and the difference in screen size.我认为这是因为使用的限制和屏幕尺寸的差异。 The height of the view (containing the fruits image and fruit) has increased.视图(包含水果图像和水果)的高度增加了。 Hope this helps :-)希望这可以帮助 :-)

Select your image then hold control+RMB and lead mouse to label.选择您的图像,然后按住 control+RMB 并引导鼠标进行标记。 Release mouse button and choose "Vertical spacing" in menu that apperas.释放鼠标按钮并在出现的菜单中选择“垂直间距”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM