1

I'm trying to make an app. I prepared the ui with sketch app.And I export the ui , it is like this: enter image description here

I add some text field and button to View

enter image description here

But when I use Auto Layout and constraints buttons and text fields are going to another place.I need the use them like in the picture.What should I do ? Do you have any suggestion ?

Thank You

Peter M
  • 7,309
  • 3
  • 50
  • 91
Murat Kaya
  • 1,281
  • 3
  • 28
  • 52

1 Answers1

0

Notice the red arrow at the top right of your second screen shot. That is telling you that your constraints are faulty. Until you fix them, you will not see your interface widgets in the desired locations.

In general, as long as you see a red or yellow arrow in that spot, you need to work on your layout some more. Do not attempt to run a project when Interface Builder shows you that red or yellow arrow; your results will be disappointing, to say the least.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Ok I solved it but in 3.5" devices its seems like this. http://prntscr.com/7g7efp – Murat Kaya Jun 12 '15 at 18:42
  • Once you have made the red/yellow arrow go away, your constraints are your constraints - you must set them up in relation to the superview so they work on different screen sizes. But that is another question! I believe I have answered correctly the question you did ask, i.e. why your views "are going to another place." – matt Jun 12 '15 at 18:48