Created
July 27, 2019 12:45
-
-
Save kichiemon/25af2f7a7c15c441765773a50eae95be 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
extension UIView { | |
func drawCircle() { | |
let circlePath = UIBezierPath(ovalIn: self.bounds) | |
let circleShape = CAShapeLayer(layer: self.layer) | |
circleShape.frame = self.bounds | |
circleShape.path = circlePath.cgPath | |
circleShape.strokeColor = ColorName.primary.color.cgColor | |
circleShape.fillColor = Color.clear.cgColor | |
circleShape.lineWidth = 0.8 | |
self.layer.addSublayer(circleShape) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment