Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C
- UIView.animate(withDuration: 0.3, animations: {
- self.plusPoints.alpha = 1
- self.plusPoints.text = "+10"
- self.plusPoints.textColor = .green
- self.plusPoints.transform = CGAffineTransform(scaleX: 2, y: 2)
- }) { (_) in
- UIView.animate(withDuration: 0.3, animations: {
- self.plusPoints.transform = CGAffineTransform.identity
- self.plusPoints.alpha = 0
- })
- }
- // D
- UIView.animate(withDuration: 0.3, animations: {
- self.plusPoints.alpha = 1
- self.plusPoints.text = "-5"
- self.plusPoints.textColor = .red
- self.plusPoints.transform = CGAffineTransform(scaleX: 2, y: 2)
- }) { (_) in
- UIView.animate(withDuration: 0.3, animations: {
- self.plusPoints.transform = CGAffineTransform.identity
- self.plusPoints.alpha = 0
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement