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

Easy Animation at Cocoaheads Copenhagen

Easy Animation at Cocoaheads Copenhagen

Slides from the Easy Animation talk at Cocoaheads Copenhagen

Marin Todorov

October 04, 2015
Tweet

More Decks by Marin Todorov

Other Decks in Technology

Transcript

  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?