{atom
//通常用來表示下載或視頻播放的進度orm
UIProgressView *_progressView;視頻
}it
//定義一個進度條屬性form
@property(retain,nonatomic) UIProgressView * pView;transform
//進度條的建立下載
_progressView =[[UIProgressView alloc]init];view
//進度條的位置大小設置vi
//進度條的高度是不能夠變化的,這裏的40是不起任何做用的系統默認co
_progressView.frame=CGRectMake(0, biaotouView.frame.size.height+biaotouView.frame.origin.y, SCREEN_WIDTH, 10);
_progressView.transform = CGAffineTransformMakeScale(1.0f,4.0f);
//甚至進度條的風格顏色值,默認是藍色的
_progressView.progressTintColor=[UIColor colorWithRed:40/255.0 green:166/255.0 blue:175/255.0 alpha:1];
//表示進度條未完成的,剩餘的軌跡顏色,默認是灰色
_progressView.trackTintColor =[UIColor colorWithRed:206/255.0 green:206/255.0 blue:206/255.0 alpha:1];
//設置進度條的進度值
//範圍從0~1,最小值爲0,最大值爲1.
//0.8-->進度的80%
_progressView.progress=0.3;
//設置進度條的風格特徵
// _progressView.progressViewStyle=UIProgressViewStyleBar;
_progressView.progressViewStyle=UIProgressViewStyleDefault;
[biaotouView addSubview:_progressView];