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.
                EPUB
            The open industry format known for its reflowable content and usability on supported mobile devices.
        
            
                 PDF
            The popular standard, used most often with the free Acrobat® Reader® software.
                PDF
            The popular standard, used most often with the free Acrobat® 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?
Alignment Rectangles
    Declaring Alignment Rectangles
Constraint Attributes
    Constraint Math
The Laws of Constraints
Creating Constraints
    Basic Constraint Declarations
    Visual Format Constraints
    Variable Bindings
Format Strings
    Orientation
    View Names
    Connections
Predicates
    Metrics
    View-to-View Predicates
    Priorities
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
    Constraining Size
Recipe: Centering Views
Recipe: Setting Aspect Ratio
Aligning Views and Flexible Sizing
    Why You Cannot Distribute Views
Recipe: Responding to Orientation Changes
Constraint Macros
    Consistent Constraints
    Sufficient Constraints
    Macros
Debugging Your Constraints
Summary
