3

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!

3

2 Answers 2

4

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

enter image description here

enter image description here

2
  • 1
    You're my Hero! I was searching for this so long! Thx! Commented Aug 4, 2017 at 13:05
  • 1
    @NicolasMierbach please accept the answer if it helped you
    – 3stud1ant3
    Commented Aug 4, 2017 at 13:09
0

You can play with stack view properties, there is one property called spacing set that to the desired spacing which you want.

Not the answer you're looking for? Browse other questions tagged or ask your own question.