在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() { super.viewDidLoad()
let progressView = UIProgressView(progressViewStyle: .default) progressView.center = self.view.center progressView.progress = 0.5 // 默认 50% self.view.addSubview(progressView)
progressView.progressTintColor = UIColor.green // 已有进度颜色 progressView.trackTintColor = UIColor.blue // 剩余进度颜色
progressView.setProgress(0.8, animated: true)
}
override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }
} |
请发表评论