Skip to content

Instantly share code, notes, and snippets.

@Aymenworks
Created January 18, 2019 02:27
Show Gist options
  • Save Aymenworks/f001d8fb3b7c442171a95d29637072cc to your computer and use it in GitHub Desktop.
Save Aymenworks/f001d8fb3b7c442171a95d29637072cc to your computer and use it in GitHub Desktop.
func update(progress: CGFloat) {
let height: CGFloat = foregroundButton.bounds.height * progress
let rect = CGRect(x: 0, y: 0, width: foregroundButton.bounds.width, height: height)
let path = UIBezierPath(rect: rect).cgPath
shapeLayer.path = path
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment