UIProgressView設(shè)置進(jìn)度的動(dòng)畫
Q:UIProgressView進(jìn)度動(dòng)畫效果會(huì)從左上角開始剿牺,并由小到大?
- (void)setProgress:(float)progress animated:(BOOL)animated
viewDidLoad里
[self.myProgressView3 setProgress:0.00001 animated:NO];
[self.myProgressView3 setProgress:0.0 animated:YES];
[UIView animateWithDuration:5 animations:^{
[self.myProgressView1 setProgress:0.8 animated:YES];
[self.myProgressView2 setProgress:0.8 animated:YES];
[self.myProgressView3 setProgress:0.8 animated:YES];
} completion:^(BOOL finished) {
}];
區(qū)別:第二個(gè)progressView設(shè)置了backgroundColor為灰色
A:讓進(jìn)度動(dòng)畫一開始高度就充滿路徑
暫時(shí)找到的方法是:
[self.myProgressView3 setProgress:0.00001 animated:NO];
[self.myProgressView3 setProgress:0.0 animated:YES];
end~希望您有所收獲
——by roy