Home > Store > Programming

larger cover

Add To My Wish List

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

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

  • Description
  • Sample Content

Product Author Bios

Erica Sadun is the bestselling author, co-author and contributor to over two-dozen books on Programming, Digital Video, Digital Photography, and Web Design, among others. She has blogged for TUAW.com and O'Reilly's Mac Devcenter and Digital Media sites, and now regularly blogs for Ars Technica. In addition to being the author of over a dozen iPhone-native applications, Erica holds a Ph. D. in Computer Science from Georgia Tech's Graphics, Visualization and Usability Center. A geek, a programmer, and an author, she's never met a gadget she didn't love.

 

When not writing, she and her geek husband parent three adorable geeks-in-training, who regard their parents with restrained bemusement.

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.

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
    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

 
Buy

eBook (Watermarked)  $2.99

Includes EPUB, MOBI, and PDF
About eBook Formats

This eBook includes the following formats, accessible from your Account page after purchase:

ePubEPUBThe open industry format known for its reflowable content and usability on supported mobile devices.

MOBIMOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

Adobe ReaderPDFThe 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 discretely watermarking it with your name, making it uniquely yours.

Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.