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

Auto Layout in iOS

Auto Layout in iOS

Introduction to Auto Layout in iOS

Sam Kirchmeier

September 12, 2013
Tweet

More Decks by Sam Kirchmeier

Other Decks in Programming

Transcript

  1. Lineup Auto Layout crash course Ways to use it Demos

    & discussion Friday, September 27, 13
  2. Alternative to Springs & Struts Relationships instead of frames Layout

    is resolved automatically Friday, September 27, 13
  3. Alternative to Springs & Struts Relationships instead of frames Layout

    is resolved automatically Magic Friday, September 27, 13
  4. Springs & Struts Auto Layout Hard-coded Isolated Views autoResizingMask Familiar

    Content-driven Related Views Constraints Friday, September 27, 13
  5. Springs & Struts Auto Layout Hard-coded Isolated Views autoResizingMask Familiar

    Content-driven Related Views Constraints Scary Friday, September 27, 13
  6. Scary == + top top standard le! le! == +

    standard Friday, September 27, 13
  7. Scary == + top top standard le! le! == +

    standard Same behavior as Springs & Struts No frame necessary Friday, September 27, 13
  8. Le! Top Baseline Width Center X Right Bottom None Height

    Center Y Leading Trailing Friday, September 27, 13
  9. Easy to accidentally delete outlets Does not allow ambiguity Adds

    minimum best constraints Friday, September 27, 13
  10. Easy to accidentally delete outlets Does not allow ambiguity Adds

    minimum best constraints Automatically promotes constraints Friday, September 27, 13
  11. Easy to accidentally delete outlets Does not allow ambiguity Adds

    minimum best constraints Automatically promotes constraints Automatically deletes constraints Friday, September 27, 13
  12. Change to portrait/landscape/freeform Promote constraints to User Constraints Learn to

    expect what IB will do Size to fit content Friday, September 27, 13
  13. Change to portrait/landscape/freeform Promote constraints to User Constraints Learn to

    expect what IB will do Size to fit content Wait for Xcode 5 Friday, September 27, 13