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

Easy Animation at Cocoaheads Copenhagen

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Easy Animation at Cocoaheads Copenhagen

Slides from the Easy Animation talk at Cocoaheads Copenhagen

Marin Todorov

October 04, 2015

Transcript

22 slides
  1. UIView.animateWithDuration(1.0, animations: { }) Create an animation context Destroy the

    animation context Original animations block Animate layer properties
  2. animations block view.alpha = 0.5 layer.position.y = 200 layer.cornerRadius =

    50 UIView.actionForLayer(layer, “alpha”) CAAnimation UIView.actionForLayer(layer, “position.y”) CAAnimation UIView.actionForLayer(layer, “cornerRadius”) NSNull
  3. How bout smth crazy? UIView.animateWithDuration(1.0, animations: { }) self.myButton.center.x =

    20 Update the view constraints and thus make this work on AL? Whaaaa?

More Decks by Marin Todorov

Other Decks in Technology