Chcę animować UISlider dla np. Od 0,25 do 0,75 iz powrotem. Powinno to pokazać użytkownikowi, co należy zrobić.Animacja UISlider płynnie
próbowałem to:
[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];
}
ale ów nie tak gładkie ... mogę używać przejścia do tego?
[Slider setValue:1 animated:YES];
jest szybko ...
[UIView animateWithDuration:2.0
animations:^{
[Slider setValue:0.2];
}];
[UIView animateWithDuration:2.0
animations:^{
[Slider setValue:0.5];
}];
Wystarczy ożywia drugi ...