문제

I use UIProgressView in iOS7 and here is the problem: let's say for demonstration I have just UIProgressView and UIButton on the UIView. When button clicked next function fires:

- (IBAction)buttonClick {
    if (self.progress.progress == 0) {
        self.progress.progress = 0.7;
    }
    else
    {
        self.progress.progress = 0;
    }
}

and what is bad, progress it is not drawn immediately, instead it is creeping from 0 to 0.7 which is of course beautiful, but not what I want right now. I try to change options in UI Builder, but nothing helped me so far.

Does anyone know if it is possible to make progress be drawn exactly the moment the button was clicked without any delay?

도움이 되었습니까?

해결책

Try to use

 -(void)setProgress:(float)progress animated:(BOOL)animated

with animated set to NO.

다른 팁

[self.progress setProgress:0.7 animated:NO];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top