0

I have a problem with AutoLayout of my project, I'm making a universal application for iPhone 4S, 5S, 6, 6 + and iPad, I'm doing it in Objective-C in XCode 6, I have understood that for XCode 6 for a universal application in the storyboard view is 600x600, I need to have a similar form to that published here, allegedly shown well in the preview, but when I run it on the actual device does not go well

I need this: enter image description here

The PreView show me this: enter image description here

but sadly the real device show me This: (in Iphone 4S T_T Why?) enter image description here

then I did try using the constrains for each item, and does not work, I did try the Editor> Auto Layout Resolve Issues> Add Missing Constrains, but goes worse enter image description here

is there any way to solve ?,I'm missing something?, some tutorial for programming I do? or I must resolve programmatically? Thank You so much

user_Dennis_Mostajo
  • 2,279
  • 4
  • 28
  • 38
  • Don't rely on Xcode automatically adding missing constraints for you--it can't always tell exactly what you want from an ambiguous layout. – Morgan Chen Oct 22 '14 at 21:29
  • Thanks @MorganChen, but you recommend adding constrains item by item? and why not the preview is the same view in real device? that could be? thanks again – user_Dennis_Mostajo Oct 22 '14 at 21:36
  • I'm not sure why the preview is different, but try this: for the stackoverflow image, "ayuda por favor", location picker, and button at the bottom, align with center horizontally. For the textfields in the form, pin leading and trailing spacing to 0 (constrain to margins). For the labels in the form, pin leading space to 0 and pin width. Then pin vertical spacing as necessary (select multiple items, go to Editor > Pin > Vertical Spacing) – Morgan Chen Oct 22 '14 at 21:56
  • It looks like you're tying everything from the bottom of the view up to the Stack Overflow label with vertical constraints between the views. You should be doing that from the top instead, or probably from the top and bottom with no vertical size constraint for the table view -- that way as the screen size changes height, the table view will grow or shrink as necessary. The labels should keep whatever size they need to fit their text. – rdelmar Oct 22 '14 at 23:06
  • thanks Morgan Chen and rdelmar I did Try Both ways, in the first way works and show me very well in the PreView for any device, but when I run in real device,(I did run in iPhone 4S and iPad) show me very different and in the second way either, I don't know why show me very different in the real device – user_Dennis_Mostajo Oct 23 '14 at 13:26

0 Answers0