0Pricing
Objective-C iOS Development for Legacy & Enterprise Apps · Lesson

Auto Layout with NSLayoutConstraint

Build adaptive UIKit interfaces in code using Auto Layout constraints so views resize correctly across devices and orientations.

Why Auto Layout?

Hardcoded frames break on different screen sizes and rotations. Auto Layout describes relationships between views — constraints — and the system computes the right frames at runtime.

Constraints Describe Rules

A constraint is a linear equation: one attribute equals a multiple of another plus a constant. For example, a button's leading edge equals its superview's leading edge plus 20 points.

All lessons in this course

  1. UIView and UIViewController
  2. Common UI Controls and Events
  3. Table Views and Collection Views
  4. Auto Layout with NSLayoutConstraint
← Back to Objective-C iOS Development for Legacy & Enterprise Apps