UIProgressView swift

时间:2021-08-27 14:47:28

//

// ViewController.swift

// UILabelTest

//

// Created by mac on 15/6/23.

// Copyright (c) 2015年 fangyuhao. All rights reserved.

//

import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad() var progressView = UIProgressView(progressViewStyle: UIProgressViewStyle.Default)
progressView.center = self.view.center
progressView.progress = 0.5
progressView.setProgress(0.8, animated: true)
progressView.progressTintColor = UIColor.greenColor()
progressView.trackTintColor = UIColor.blueColor() self.view.addSubview(progressView)
// Do any additional setup after loading the view, typically from a nib.
} override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

}