iPhone开发 UIProgressView与计时器一起使用
-(IBAction)btnStartClick
{
proValue=0;
timer = [NSTimerscheduledTimerWithTimeInterval:0.001target:selfselector:@selector(changeProgress) userInfo:nilrepeats:YES];
}
-(void)changeProgress
{
proValue +=1.0;
if(proValue > 1500)
{
//停用计时器
[timer invalidate];
}
else
{
[proView setProgress:(proValue/1500)];
}
}
摘自 凡娃软件
补充:移动开发 , IOS ,