PRODUCT SUPPORT ANNOUNCEMENT
See the latest about COVID-19 shipping availability and video/Web Edition load errors. Learn more.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDF The popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
The iOS 6 software development kit (SDK) has revolutionized view layout. Apple's layout features will make your life easier and your interfaces more consistent, regardless of device geometry and orientation. In this excerpt from The iOS Developer's Cookbook-Core Recipes for Programmers (Early Edition), bestselling author and developer Erica Sadun introduces code-level constraint development. You'll discover how to create relations between on-screen objects and specify the way iOS automatically arranges your views. The outcome is a set of robust rules that adapt to screen geometry.
This digital short is an adapted excerpt from The Core iOS 6 Developer's Cookbook (Early Edition), 4th Edition (ISBN 9780133361704). The content of this digital short may differ slightly from the content in the book. Purchasers of this digital short are invited to use coupon code sadunviewconst good for 30% off the list price of the book on InformIT exclusively.
What Are Constraints?
Declaring Alignment Rectangles
The Laws of Constraints
Basic Constraint Declarations
Visual Format Constraints
Format String Summary
Storing and Updating Constraints
Recipe: Comparing Constraints
Recipe: Describing Constraints
Recipe: Creating Fixed-Size Constrained Views
Disabling Autosizing Constraints
Starting within View Bounds
Recipe: Centering Views
Recipe: Setting Aspect Ratio
Aligning Views and Flexible Sizing
Why You Cannot Distribute Views
Recipe: Responding to Orientation Changes
Debugging Your Constraints