Created
January 18, 2019 02:27
-
-
Save Aymenworks/f001d8fb3b7c442171a95d29637072cc to your computer and use it in GitHub Desktop.
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
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