1

I've spent sleepless nights trying to follow every tutorial there is about xcode 5's autolayout feature but I cannot do it myself.

Here's screenshots:

Pic 1: All constraints are cleared in view.

Pic 2: Add 'Bottom Space to Bottom Layout Guide' to container view and two buttons.

Pic 3: So these are all the constraints I have.

Pic 4: when I resize view to 3.5 inch nothing works.

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
  • Make sure all the constraints are present to avoid ambiguity and are referring to the right edge in the right reference frame. – HM1 Feb 09 '14 at 07:53
  • @gturri I don't have any code, I didn't think you needed any code when using Autolayout – sal hutchinson Feb 09 '14 at 16:46
  • @HM1 so "add missing constraints"? – sal hutchinson Feb 09 '14 at 16:47
  • See [Add Missing Constraints](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/WorkingwithConstraints/WorkingwithConstraints.html#//apple_ref/doc/uid/TP40010853-CH8-SW1) and [Resolving AutoLayout Issues](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/ResolvingIssues/ResolvingIssues.html#//apple_ref/doc/uid/TP40010853-CH17-SW1) – HM1 Feb 09 '14 at 16:58

2 Answers2

1

i think you are adding two button (login +register) as subViews to some view (say whiteView) which has white backGround.
If above is true, then add a pin of "bottomSpace to superview" to that whiteView. so it always keeps the same distance from superView from bottom.

santhu
  • 4,796
  • 1
  • 21
  • 29
0

I've found the best answer to be this:

Make a new storyboard specifically for 3.5 inch screens then in app delegate, just say if (some definition of iphone 5) then display main storyboard, else display the 3.5 inch one.

Here's a more in depth explanation: https://stackoverflow.com/a/12537190/2948421

Community
  • 1
  • 1