Answers for "set ui progress bar height swift 5"

0

swift 5 progress bar height

//Create a custom class of UIProgressView and override the layoutSubviews function
//Also add a height constraint to the ProgressView on the storyboard

override func layoutSubviews() {
        super.layoutSubviews()

        let maskLayerPath = UIBezierPath(roundedRect: bounds, cornerRadius: 4.0)
        let maskLayer = CAShapeLayer()
        maskLayer.frame = self.bounds
        maskLayer.path = maskLayerPath.cgPath
        layer.mask = maskLayer
    }
Posted by: Guest on January-16-2021

Code answers related to "set ui progress bar height swift 5"

Code answers related to "Swift"

Browse Popular Code Answers by Language