isAnimating return is faulty for UIImageView for iPhone(iPhone 的 UIImageView 的 isAnimating 返回错误)
问题描述
我发现 isAnimating 在完成最大循环数并停止动画后仍返回 true.但是一旦你移动 UIImageView,它会突然更新并变为 false.
I am finding that isAnimating is returning true even after it has completed the max # of loops and stopped animating. However once you move the UIImageView, it will suddenly update and change to false.
以下是我的代码的重要部分:我以标准方式设置动画:
Here are the important bits of my code: I set up the animation in the standard way:
UIImageView* newImageView = ...
newImageView.animationImages = imageArray;
newImageView.animationDuration = 1.0;
newImageView.animationRepeatCount = 1;
...
[newImagView startAnimating];
在代码的其他地方,我正在检查动画是否已经完成:
Elsewhere in the code I am checking whether the animation has come to completion with:
if (not [newImageView isAnimating])
{
...
}
动画停止几秒后,isAnimating 仍会返回 true.
Seconds after the animation has stopped, isAnimating will still return true.
但是,如果 newImageView 已经以某种方式更新(在我的情况下是移动它),它会突然返回 false.这似乎无关,并指出这是一个错误.
However if the newImageView has been updated in some way (in my case moving it), it will suddenly return false. Which seems unrelated, and points towards this being a bug.
有没有人遇到过这种情况或知道解决方法?
Has anyone run into this or know a work around?
推荐答案
我在 iphone 4.1 SDK 上进行了编译测试,并在 3.1.x 设备上运行.
I tested it compiling with iphone 4.1 SDK and runngin thaton a 3.1.x device.
isAnimating 在设备上有效,但不适用于任何 iphone simualtor 3.2,4.0,4,1
isAnimating on device works but not with any iphone simualtor 3.2,4.0,4,1
这篇关于iPhone 的 UIImageView 的 isAnimating 返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:iPhone 的 UIImageView 的 isAnimating 返回错误


- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01