7
我想動畫用於例如一個UISlider 0.25到0.75並返回。這應該顯示用戶該做什麼。動畫UISlider順利
我想這:
[self incrementCounter:[NSNumber numberWithInt:0]];
-(void) incrementCounter:(NSNumber *)i {
[Slider setValue:[i floatValue]/1000];
[self performSelector:@selector(incrementCounter:) withObject:[NSNumber numberWithInt:i.intValue+1] afterDelay:0.001];
}
但那不是那麼順利......我可以使用轉換爲這個?
[Slider setValue:1 animated:YES];
是快速...
[UIView animateWithDuration:2.0
animations:^{
[Slider setValue:0.2];
}];
[UIView animateWithDuration:2.0
animations:^{
[Slider setValue:0.5];
}];
只是動畫的第二個...