UIView的AnimateWithDuration处理快 [英] UIView AnimateWithDuration handles to fast
本文介绍了UIView的AnimateWithDuration处理快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
[UIView animateWithDuration:20.5
delay:0.0
options:UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveEaseInOut
animations:^{
cloudA.frame = CGRectMake(cloudIMG.frame.size.width/2, 0, cloudIMG.frame.size.width, cloudIMG.frame.size.height);
}
completion:NULL];
我有这样的code,它工作正常在iPad上(的iOS 7.0),但在我的iPhone(iOS版7.1)它处理一秒钟内相同的动画。
I have this code, it works fine on the iPad (iOS 7.0), but on my iPhone (iOS 7.1) it handles the same animation within a second.
推荐答案
这很奇怪,因为这个问题只在iOS 7.1的出现,这可能是一个错误的东西?
无论如何,我发现暂停动画,并开始再次解决了这个问题。
正因为如此,我添加了一个延迟的动画功能,它是直接从viewDidLoad中调用,一切似乎现在的工作很好。
It is strange because this problem only appears on iOS 7.1, could this be a bug or something? Anyway, I found out that pausing the animation and start it again solved the problem. Because of that I added a delay to the animation function which was directly called from ViewDidLoad, and everything seems to work fine now.
这篇关于UIView的AnimateWithDuration处理快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文