Pergunta

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?

Foi útil?

Solução

Try to use

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

with animated set to NO.

Outras dicas

[self.progress setProgress:0.7 animated:NO];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top