1
我试图在更改值时减慢UISlider的动画。iOS - 如何减慢UISlider动画?
到目前为止,我已经试过了旧的UIView动画方法:
[UIView beginAnimations:@"slider" context:nil];
[UIView setAnimationDuration:5.0];
[self.slider setValue:2 animated:YES];
[UIView commitAnimations];
而新的基于块的方法:
[UIView animateWithDuration:5.0
animations:^{
[self.slider setValue:2 animated:YES];
}];
我一直有和没有animated:YES
值设定尝试。在所有情况下,滑块仅以默认速度动画。
是否有另一种策略,我应该看看自定义动画的速度?
我应该继承滑块并覆盖那里的任何东西吗?