Created
August 13, 2018 06:43
-
-
Save daoseng33/2c8c2352802c9e9fb16303e2f8695b1c to your computer and use it in GitHub Desktop.
This file contains 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
// Draw dotted line | |
let viewBorder = CAShapeLayer() | |
viewBorder.lineDashPattern = [2, 2] | |
viewBorder.frame = myView.bounds | |
viewBorder.fillColor = nil | |
viewBorder.path = UIBezierPath(rect: myView.bounds).cgPath | |
myView.layer.addSublayer(viewBorder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment