Created
January 4, 2021 04:53
-
-
Save congnd/2318242508fdc300f97cf69384aa3159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let animation = CABasicAnimation(keyPath: #keyPath(CALayer.transform)) | |
let angle = CGFloat.random(in: ) * CGFloat.pi | |
let rotation = CATransform3DMakeRotation(angle, 0, 1, 0) | |
let finalScale = CGFloat.random(in: 2…5) | |
let transoform = CATransform3DScale(rotation, finalScale, finalScale, 1) | |
animation.toValue = transoform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment