Pregunta

¿Es posible animar el cambio de un UIProgressView para que la pantalla se mueva suavemente al nuevo valor?

Un poco como NSProgressIndicator hace.

¿Fue útil?

Solución

Si está interesado en esto, complete un informe de error, Duplicate / 5883058:

Título: UIProgressView setProgress: (float) valor animated: (BOOL) animado

Descripción del problema: UIProgressView debe tener un setProgress: (float) valor animated: (BOOL) animado como UISlider para poder animar el progreso.

https://bugreport.apple.com

Otros consejos

El método de UIProgressView setProgress: animated: se agregó en iOS 5:

[progressView setProgress:1.0 animated:YES];

https://developer.apple.com/ library / ios / documentation / UIKit / Reference / UIProgressView_Class / index.html

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

animado : SÍ, si el cambio debe animarse, NO, si el cambio ocurre de inmediato.

     

Disponible en iOS 5.0 y versiones posteriores.

(Versión Swift)

El método de UIProgressView setProgress: animated: :

self.progressView.setProgress(1, animated: true)

https://developer.apple.com /library/ios/documentation/UIKit/Reference/UIProgressView_Class/index.html

open func setProgress(_ progress: Float, animated: Bool)
  

animado - VERDADERO si el cambio debe ser animado, FALSO si el cambio debe ocurrir inmediatamente.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top