Answers for "change height of progress bar swift"

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 "change height of progress bar swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language