Skip to content

Instantly share code, notes, and snippets.

@robertherdzik
Created September 24, 2017 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertherdzik/c645b496f73354fdd0724ffbbddd98df to your computer and use it in GitHub Desktop.
Save robertherdzik/c645b496f73354fdd0724ffbbddd98df to your computer and use it in GitHub Desktop.
let animation = CABasicAnimation(keyPath: "opacity")
animation.beginTime = CACurrentMediaTime() + 3
animation.fillMode = kCAFillModeForwards
animation.isRemovedOnCompletion = false
animation.duration = 3
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
animation.fromValue = 1
animation.toValue = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment