Last active
January 16, 2017 16:04
-
-
Save mkj-is/11ee4c99853387bbabf138bd33fdbc0c to your computer and use it in GitHub Desktop.
Bezier path to shape layers
This file contains hidden or 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 paths = [thPath, ePath, fuPath, nPath, tPath, aPath, sPath, t2Path, yPath] | |
let layers = paths.map { path -> CAShapeLayer in | |
let layer = CAShapeLayer() | |
layer.path = path.cgPath | |
layer.strokeEnd = 0 | |
layer.strokeColor = UIColor.white.cgColor | |
layer.lineWidth = 1 | |
layer.fillColor = UIColor.clear.cgColor | |
return layer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://blog.thefuntasty.com/swift-stroke-animations-e1b864917255