Answers for "swift uikit custom corner radius"

0

how to add corner in swiftui

extension UIView {
   func roundCorners(corners: UIRectCorner, radius: CGFloat) {
        let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
        let mask = CAShapeLayer()
        mask.path = path.cgPath
        layer.mask = mask
    }
}
Posted by: Guest on May-24-2021

Code answers related to "swift uikit custom corner radius"

Code answers related to "Swift"

Browse Popular Code Answers by Language