SHARE
TWEET

Untitled

a guest May 16th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // C
  2. UIView.animate(withDuration: 0.3, animations: {
  3.       self.plusPoints.alpha = 1
  4.       self.plusPoints.text = "+10"
  5.       self.plusPoints.textColor = .green
  6.       self.plusPoints.transform = CGAffineTransform(scaleX: 2, y: 2)
  7. }) { (_) in
  8.       UIView.animate(withDuration: 0.3, animations: {
  9.           self.plusPoints.transform = CGAffineTransform.identity
  10.           self.plusPoints.alpha = 0
  11.       })
  12. }
  13.  
  14. // D
  15. UIView.animate(withDuration: 0.3, animations: {
  16.       self.plusPoints.alpha = 1
  17.       self.plusPoints.text = "-5"
  18.       self.plusPoints.textColor = .red
  19.       self.plusPoints.transform = CGAffineTransform(scaleX: 2, y: 2)
  20. }) { (_) in
  21.       UIView.animate(withDuration: 0.3, animations: {
  22.           self.plusPoints.transform = CGAffineTransform.identity
  23.           self.plusPoints.alpha = 0
  24.       })
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top