-1

See my image: https://postimg.org/image/7t1bb3hyx/ the real view is different than the view in the assistant preview... I used a stack view for the buttons. What am I doing wrong? Constrains: https://postimg.org/image/86ehdpkt9/

Petravd1994
  • 893
  • 1
  • 8
  • 24
  • This question needs a lot more information before it is answerable. – CaldwellYSR Dec 19 '16 at 19:43
  • Maybe you can provide enough information about the information I am missing so I can update the question. – Petravd1994 Dec 19 '16 at 19:44
  • At the very least knowing whether you're using auto-layout or what kind of constraints each element has would be helpful. Your simulator could be zoomed in, your constraints could be set up wrong. We don't know what it looks like on different simulated devices. There are too many possibilities for what could be causing the problem for anyone to give a confident answer. – CaldwellYSR Dec 19 '16 at 19:47
  • When using Stack View you automatically using auto-layout. I will provide the constrains in 1 minute to update the question. The picture however shows 2 different simulated devices. Zooming in into the assistant preview gives me exactly the same view as the storyboard. – Petravd1994 Dec 19 '16 at 19:52

1 Answers1

1

EDIT

Just saw the constraints you posted. You have two constraints for StackView.Top. Try leaving the "Top Layout Guide" one and deleting the title.bottom constraint. I think this one is overriding. If you want to specify the height of the label use the height constraint, or specify a font size.


Just a guess here but, your layout may be placed above the "Top Layout Guide". Drag your label down some and add a constraint to your label (or edit the one you have) and have it based off the top layout constraint instead of the "View". This will scoot everything down a little bit so we can have that top bar that shows the battery and such.


Label near top

enter image description here

Notice when the label is close to the top it distance is based of the view.


Label down a bit

enter code here

Now you can base your label constraint off the "Top Layout Guide"

sargturner
  • 540
  • 2
  • 18