![]() |
Auto Layout by Tutorials |
List books:
2, Mastering Git
3, Auto Layout by Tutorials
4, Apple Augmented Reality by Tutorials
5, App Design Apprentice
In other words, it shouldn’t matter whether you run your apps on an iPhone 11 Pro Max or an iPad 12.9” — either way, it should look good. The same holds true for dynamic content. Whether it’s a single line of text or twenty lines of text, your UI needs to adapt. With an adaptive layout, you can create a visually stunning app on all devices.
This is where Auto Layout comes in.
What is Auto Layout?
Auto Layout is a constraint-based layout system designed for building dynamically sized user interfaces. It lets you create user interface layouts that dynamically adapt for all screen sizes without manually setting the frame of every view.
For a complete Auto Layout system, every view must have a defined position and size. In other words, Auto Layout has to know how to position and size every user interface element in different circumstances. You’ll learn more about this later.
Auto Layout helps developers adapt user interface layouts for external and internal changes. Some examples include:
-
Different screen sizes.
-
iPadOS multitasking features like Slide Over, Split View and Picture in Picture.
-
Device rotation.
-
Larger text support.
-
Internationalization support.
-
Dynamic content support.
Beginning Auto Layout
Before you jump into learning about Auto Layout, it’s important to understand that Auto Layout isn’t automatic; you need to do some work to get it right. Some of the topics this book covers include:
-
Thinking in auto layout (relativity).
-
Dynamically sizing a UITableViewCell / UICollectionViewCell.
-
Using Auto Layout with UIStackView and how to optimize for minimal constraints.
-
Constraint content hugging and compression resistance priorities.
-
Constructing Auto Layout programmatically.
To get started, you’ll learn about the foundational layer of any UIKit user interface running on iOS/iPadOS.
No comments:
Post a Comment