
我试过这个:
[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]; }]; 只是动画第二个……
解决方法 您需要通过将第二个动画放在第一个动画的完成块中来链接动画:-(IBAction)animateSlIDer:(ID)sender { [UIVIEw animateWithDuration:2 animations:^{ [self.slIDer setValue:.75]; } completion:^(BOol finished) { [UIVIEw animateWithDuration:2 animations:^{ [self.slIDer setValue:0.25];//or `[self.slIDer setValue:(.75)-(.5*finished)];` if you want to be safe }]; }];} 总结 以上是内存溢出为你收集整理的ios – Animate UISlider顺利进行动画制作全部内容,希望文章能够帮你解决ios – Animate UISlider顺利进行动画制作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)