Skip to content

Instantly share code, notes, and snippets.

@alsedi
Last active September 1, 2016 14:44
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 alsedi/afa23a782a1559adb723245161b129e2 to your computer and use it in GitHub Desktop.
Save alsedi/afa23a782a1559adb723245161b129e2 to your computer and use it in GitHub Desktop.
private func generateShapes() {
for i in 0..<shapesCount * 2 - 1 {
let shape = MutableShapeLayer()
shape.setup(size: minimalSize + ((step / 2.0) * CGFloat(i)), center: center, thickness: shapeWidth, color: (i % 2 == 0) ? UIColor.black : UIColor.white)
shapes.append(shape)
layer.insertSublayer(shape, at: 0)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment