Book description
Auto Layout re-imagines the way developers create user
interfaces. It provides a flexible and powerful system that
describes how views and their content relate to each other and to
the windows and superviews they occupy. In contrast to older design
approaches, this technology offers incredible control over layout
with a wider range of customization than frames, springs, and
struts can express.
In this guide, Erica Sadun, bestselling author of The Core iOS 6
Developer's Cookbook and The Advanced iOS 6 Developer's
Cookbook, helps readers learn how to use Auto Layout
effectively, even masterfully, by providing an abundance of
examples alongside plenty of explanations and tips. Instead of
struggling with class documentation, you learn in simple steps how
the system works and why it’s far more powerful than you
first imagined. You read about common design scenarios and discover
best practices that make Auto Layout a pleasure rather than a chore
to use. Sadun includes examples of non-obvious ways to use Auto
Layout to build interactive elements, animations, and other
features beyond what you might normally lay out in Interface
Builder to help expand the reader’s design possibilities.
With this book you will learn
The basic concepts that form the foundation of Auto Layout
How to create clear and satisfiable rules of your layout, called constraints
How to work effectively with the Interface Builder Layout
What visual constraints look like, how to work with them, and how they are used in your projects
How to debug constraints
How to design interfaces when working with Auto Layout
Effective solutions to the most common real-world problems and challenges
Approximately 238 pages.
For related content by author Erica Sadun, see The Core iOS 6
Developer’s Cookbook, and The Advanced iOS 6
Developer’s Cookbook.
Table of contents
- Title Page
- Copyright Page
- Dedication Page
- Contents
- Acknowledgments
- About the Author
- Preface
- Take Our Survey
- Editor’s Note: We Want to Hear from You!
- 1. Introducing Auto Layout
-
2. Constraints
- Constraint Types
- Priorities
- Content Size Constraints
- Layout Constraints
- The Layout Constraint Class
- Creating Layout Constraints
- Using NSLayoutConstraint
- View Items
- Constraints, Hierarchies, and Bounds Systems
- Installing Constraints
- Removing Constraints
- Comparing Constraints
- Laws of Layout Constraints
- Summary
- 3. Interface Builder Layout
-
4. Visual Formats
- Introducing Visual Format Constraints
- Options
- Variable Bindings
- Metrics
- Format String Structure
- Orientation
- View Names
- Connections
- View Sizes
- Format String Components
- Getting It Wrong
- NSLog and Visual Formats
- Constraining to a Superview
- View Stretching
- Constraining Size
- Building Rows or Columns
- Matching Sizes
- Why You Cannot Distribute Views
- Summary
-
5. Debugging Constraints
- Reading Console Logs
- Examining Constraint Logs
- A Note about Layout Math
- Constraint Equation Strings
- Adding Names
- Describing Views
- Example: Unexpected Padding
- Example: The Hugged Image
- Example: View Centering
- Descent Reports
- Example: Ambiguity
- Example: Expanding on Console Dumps
- Visualizing Constraints
- Launch Arguments
- Internationalization
- Profiling Cocoa Layout
- Auto Layout Rules of Debugging
- Summary
- 6. Building with Auto Layout
- 7. Layout Solutions
- Index
Product information
- Title: iOS Auto Layout Demystified
- Author(s):
- Release date: April 2013
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780133440669
You might also like
book
iOS Auto Layout Demystified, Second Edition
Completed Updated for iOS 7 and Xcode 5 Auto Layout transforms the way you create iOS …
book
iOS 8 SDK Development, 2nd Edition
The iOS 8 SDK changes everything. New programming language, new ways to work with other apps, …
book
Swift: Developing iOS Applications
Unleash the power of Swift and discover the skills required to build incredible robust iOS applications …
book
Beginning iPhone Development with Swift 5: Exploring the iOS SDK
Learn how to integrate all the interface elements iOS users have come to know and love, …