What is Auto-Layout?

Oscar de la Hera Gomez
A flower that represents Digital Craft with the text "What is Auto-Layout?" beneath it.

Auto layout is a design technology that uses a constrained-based approach to dynamically adapt UI elements as the size and position of a view, screen or frame changes.

Traditionally, designers laid out their user interface by setting the frame for each view in a screen in what is known as a Frame Based Layout. The frame defined the view’s origin, height, and width in the superview’s coordinate system.

An image shown how design can be created by creating UI elements that use an x and y position along with a width and a height, within a screen.

Apple's example of a frame based layout.

Auto Layout defines your user interface using a series of constraints. Constraints typically represent a relationship between two views. Auto Layout then calculates the size and location of each view based on these constraints. This produces layouts that dynamically respond to both internal and external changes.

An example of a layout that creates UI elements by dictating how far away they are from the edges of the screen.

Apple's example of a constrained based layout.

How do I implement an auto layout ?

To use auto layout:

  • Use the auto layout feature in Figma.
  • Use a flexible box (Flex Box) or Grid on the web (CSS).
  • Use NSLayoutConstraints in iOS (Swift).
  • Use a ConstraintLayout in Android (Kotlin).

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details