Last active
November 21, 2019 11:00
-
-
Save daoseng33/51baad3a2d58246884188389923bbde7 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
let maskPath = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 5, height: 5)) | |
let maskLayer = CAShapeLayer() | |
maskLayer.frame = view.bounds | |
maskLayer.path = maskPath.cgPath | |
view.layer.mask = maskLayer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment