Answers for "swiftui button rounded corners"

0

ios rounded button

button.layer.cornerRadius = button.frame.size.height / 2
// must be in the viewDidLoad func
Posted by: Guest on April-11-2020
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 "swiftui button rounded corners"

Code answers related to "Swift"

Browse Popular Code Answers by Language