Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Adaptive Layout

sammyd
February 06, 2015

Introduction to Adaptive Layout

Slides from RWDevCon 2015. They might not make the most sense, since the talk is of a tutorial format

sammyd

February 06, 2015
Tweet

More Decks by sammyd

Other Decks in Programming

Transcript

  1. Adaptive Layout Abstracts layout away from device specifics Introducing concept

    of size classes Available in iOS 8 Fully supported in Xcode and IB
  2. Session Overview Introduction to Size Classes Demo of installable constraints

    & views Lab to learn adaptive fonts and images Challenge to bring it all together
  3. Size Classes Horizontal Vertical iPad Portrait Regular Regular iPad Landscape

    Regular Regular iPhone Portrait Compact Regular iPhone Landscape Compact Compact iPhone 6 Plus Landscape Regular Compact
  4. Approach to Adaptive Layout 1. Build base layout 2. Choose

    size class override 3. Uninstall irrelevant constraints 4. Add new constraints specific to size class 5. Rinse and repeat
  5. Adaptive Layout Universal storyboards FTW Get a long way without

    code Size class overrides are conceptually equivalent to subclassing
  6. Where to go from here? All backed with UITraitCollection in

    code - with additions to UIViewController Adaptive layout is just one part of adaptive UI in iOS8
  7. Where to go from here? Tutorials on raywenderlich.com Chapters in

    iOS 8 by tutorials WWDC videos from Apple
  8. Learn by doing Don’t be scared of Auto Layout Thanks

    @iwantmyrealname shinobicontrols.com/giveaway