1、创建进度条
progressView.frame = CGRect(x:10, y:230, self.view.bounds.size.width - 20, height:150) progressView.progressViewStyle = .default progressView.center = self.view.cente
progressView.progress = 0.5 //默认进度50% self.view.addSubview(progressView)
2、设置进度,同时又动画效果
progressView.setProgress(0.8, animated: true)
3、改变进度条的颜色
progressView.progressTintColor = UIColor.red
progressView.trackTintColor = UIColor.green