我想以编程方式快速制作 UIProgressBar 吗?
这段代码有什么问题?
override func viewDidLoad() {
super.viewDidLoad()
let progressView = UIProgressView(progressViewStyle: .Bar)
progressView.center = self.view.center
progressView.frame = CGRectMake(0,0,50,20)
progressView.translatesAutoresizingMaskIntoConstraints = false
progressView.setProgress(0.5, animated: false)
self.view.addSubview(progressView)
}