Saturday 15 August 2015

ios - Using auto-layout to make a perfect square -


I have a view with an image view in it I want to be able to create that image image is always a full square Remains, but I'm not completely sure how to apply it with autolayout.

My screen looks like this:

Image description here Enter

Image What I want to do is to be square, there is no width dimension. I think it can be done with obstacles, and I've tried, but ultimately unable to understand how to achieve it. This is probably due to my relative experience due to the normal development of autolayout, storyboard and IOS

Obstacles for your square view: top space , key location , trailing spacing and aspect ratio . It has been shown: Enter image details here

Make sure that your aspect ratio is square 1: 1 Enter image details here

Hope it helps and auto Greetings layout with!


No comments:

Post a Comment