Home > Store

Introducing View Constraints: The Core iOS 6 Developer's Cookbook

Register your product to gain access to bonus material or receive a coupon.

Introducing View Constraints: The Core iOS 6 Developer's Cookbook

eBook (Watermarked)

  • Your Price: $2.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader 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.


  • Copyright 2013
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-336441-0
  • ISBN-13: 978-0-13-336441-5

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.

Sample Content

Table of Contents

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
    View Names
    View-to-View Predicates
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
Debugging Your Constraints


Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership