简体   繁体   English

UIView AnimateWithDuration可以快速处理

[英]UIView AnimateWithDuration handles to fast

 [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];

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. 我有这段代码,它在iPad(iOS 7.0)上可以正常工作,但是在我的iPhone(iOS 7.1)上,它可以在一秒钟内处理相同的动画。

It is strange because this problem only appears on iOS 7.1, could this be a bug or something? 奇怪的是,此问题仅出现在iOS 7.1上,这可能是错误还是什么? 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. 因此,我为从ViewDidLoad直接调用的动画功能添加了一个延迟,现在一切似乎都可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM