I create progress bar in my app using this code:
let progressBar = UIProgressView(progressViewStyle: .default)
progressBar.setProgress(1.0, animated: true)
self.addSubview(progressBar)
progressBar.trackTintColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 0.2)
progressBar.tintColor = .white
let frame = CGRect(x: percentLabel.intrinsicContentSize.width + 30.0, y: 117, width: 254, height: 3)
progressBar.frame = frame
And as you can see here:
If the progress is 1.0, progress bar goes beyond the frame. Any ideas how to fix that??