简体   繁体   中英

Xcode Storyboard: Constraints don't let me put space between objects in a stack

i'm learning Swift and programming with Xcode right now. First of all to get a impression of how everything works I'm doing the Apple Tutorial Start Developing iOS Apps (Swift) .

I was building the App exactly how it is described in the tutorial but as i do, it isn't possible for me to get the same result.

Following should be the Result: Apple's Result

Following is the Result I get of: ---PICTURE 2 in Comments---

The Problem is the Gap between the Label / TextBox / Button that is not here in my Version. I don't know why it is so. I did everything exactly like in the Tutorial of Apple. I rechecked everything twice but i don't know what the fault is. Can you please help me? How do I get this gap. Even adding more Constraints for the Items inside of the Stack doesn't work. I just get following Result:

---PICTURE 3 IN COMMENTS---

How do i add this gap or what have I done wrong in the Tutorial?

Thx for your Help!

You can specify it in Attributes inspector. Take a look at the following photos.

在此输入图像描述

在此输入图像描述

您可以使用堆栈视图属性,有一个名为空间的属性设置为您想要的所需间距。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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