jamie jamie - 4 months ago 8x
iOS Question

Autolayout constraint left

I'm just getting started with iOS development, and I'm following a series for making a game.

I want to align the circle (see screenshot) but there is no constraint for left

How can I make sure it aligns left for example on the iPhone 4 (see screenshot).

enter image description here

Xcode version (7.3.1 (7D1014))


Option 1: Hold control button, drag to the left and select `Leading spaces to container. The object that you are defining the space from should be highlighted. You should get the following menu:


Option 2: 1. Select the object 2. Press the pin button 3. Set the distance from the frame 4. Pressed the red button 5. Select Add constraints

add constrains