Skip to content

Instantly share code, notes, and snippets.

@mkj-is
Last active January 16, 2017 16:04
Show Gist options
  • Save mkj-is/11ee4c99853387bbabf138bd33fdbc0c to your computer and use it in GitHub Desktop.
Save mkj-is/11ee4c99853387bbabf138bd33fdbc0c to your computer and use it in GitHub Desktop.
Bezier path to shape layers
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
}
@mkj-is
Copy link
Author

mkj-is commented Jan 16, 2017

ft-blog-logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment