Sandah Aung
Sandah Aung

Reputation: 6188

Place an image in the centre of remaining bottom area on iOS screen

I have placed an image on an iOS screen and in the area that remains in the bottom, I would like to place another image in the centre of that space. I could do that with Android using relative layouts. How can this be achieved in iOS auto layout?

placing denko logo

Upvotes: 0

Views: 132

Answers (2)

JZAU
JZAU

Reputation: 3567

This is an simple example.

Just select the Horizontal Center in Container after pin other required constrains.

enter image description here

And this is the final layout constrains:

enter image description here

Upvotes: 0

rounak
rounak

Reputation: 9397

Let the image view take up the remaining bottom space (fairly easy to do using auto layout), and then set its contentMode to Center.

Upvotes: 1

Related Questions