swift - UIProgressView的用法
1、创建进度条
progressView.frame = CGRect(x:10, y:230, width: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
本文来自博客园,作者:稻草人11223,转载请注明原文链接:https://www.cnblogs.com/hero11223/p/5692664.html