Animations with Auto Layout

Animations with Auto Layout

My presentation on mdevcon 2015 :)

Bbb75c4dd2e17a7e3114c730ec7144d0?s=128

Marin Todorov

March 06, 2015
Tweet

Transcript

  1. iOS Animations with Auto Layout

  2. Marin Todorov Underplot Apps www.raywenderlich.com

  3. Books

  4. Today’s Loot

  5. Animation in UIKit Animating UIViews Property animations Easy, one-liners Built-in

    & free! alpha = 1.0 alpha = 0.0 2 seconds duration
  6. Animations in Auto Layout 100pt 10pt 160pt 90pt (10.0, 100.0)

    -> (90.0, 160.0)
  7. NSLayoutConstraint bottom = parent.centerY * 1/4 + 50 firstItem firstAttribute

    secondItem secondAttribute multiplier constant
  8. Animations Auto Layout

  9. 1. Find & Replace constraints

  10. Constraints .Top .Bottom .Trailing .Leading .Height .Width

  11. = superview.height * 0.34 + 0.0 mutable read only

  12. 0.34 0.34 0.34 0.55 0.23 0.23 Auto Layout

  13. 2.Modify existing constraint

  14. Details Text Details Text 0.0 Details Text Details Text -160

    Auto Layout
  15. label.Leading = superview.Leading * 0.1 + 0.0 label.Leading = superview.Leading

    * 0.1 + 0.0 label.Leading = superview.Leading * 0.1 - 160.0
  16. None
  17. 3. IB Outlets

  18. Interface Builder

  19. Giveaway rules #mdevcon

  20. 1. find & replace 2. modify existing 3. contstraint outlets

    #mdevcon
  21. [Homework]. Create new constraints #mdevcon

  22. Giveaway #mdevcon

  23. Thank you! : @icanzilb : icanzilb www.ios-animations-by-tutorials.com www.ios-animations-by-emails.com