{
//一般用来表示下载或视频播放的进度
UIProgressView *_progressView;
}
//定义一个进度条属性
@property(retain,nonatomic) UIProgressView * pView;
//进度条的创建
_progressView =[[UIProgressView alloc]init];
//进度条的位置大小设置
//进度条的高度是不可以变化的,这里的40是不起任何作用的系统默认
_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];