ttotto
ttotto

Reputation: 837

iOS Storyboard AutoLayout how to place UIView at the bottom in the both of 3.5" and 4" screens?

I want to place black UIView at the bottom in the both of 3.5" and 4" screens using AutoLayout.
I added bottom constraints on the black UIView, but the view was always hidden in 3.5" screen.
I will never use AutoLayout in next project, but in current project, how can I fix it?

enter image description here

enter image description here

Following is parent view's constraints.

enter image description here

Upvotes: 1

Views: 1204

Answers (2)

Boran
Boran

Reputation: 959

Edit: Select black view press add new constraint button check height and click only buttom constraint and add these two. After that press add missing constraints button. It should solve your issue.

Upvotes: 6

Wain
Wain

Reputation: 119031

By the looks of things it is the constraints on the superview that are the issue. This looks to result in the superview being too high on a 3.5 screen.

Check the superview constraints and ensure that:

  1. The height is not pinned
  2. The top and bottom of the view are pinned to appropriate things

Check the 'document outline' and see if it lists any layout issues - correct them. Each view needs to tell the layouting system where is should be placed and how big it should be.

p.s. you should use auto-layout in your future projects

Upvotes: 1

Related Questions