ios - 播放一次 UIImageView 动画并在播放后立即将其从内存中删除的最佳方法是什么?

标签 ios uiviewanimation

我很难从内存中删除我的动画。执行此操作的最佳方法是什么?

这是我的动画代码:

-(IBAction)animationOneStart { 

NSMutableArray *images = [[NSMutableArray alloc] initWithCapacity:88];

for(int count = 1; count <= 88; count++)
{
NSString *fileName = [NSString stringWithFormat:@"testPic1_%03d.jpg", count];
UIImage  *frame    = [UIImage imageNamed:fileName];
[images addObject:frame];
}

loadingImageView.animationImages = images;

loadingImageView.animationDuration = 5;
loadingImageView.animationRepeatCount = 1; //Repeats indefinitely

[loadingImageView startAnimating];
[images release];

}

谢谢!

最佳答案

[images removeAllObjects];
[images release];

关于ios - 播放一次 UIImageView 动画并在播放后立即将其从内存中删除的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7789407/

相关文章:

ios - 如何使 UITableView 不改变 imageView 的框架,或调整图像的大小以填充框架大小?

javascript - JavaScript 中的 try-catch : how to get stack trace or line number of the original error

ios - CNCopySupportedInterfaces() 没有返回任何值,尽管 wifi 已连接

ios - 添加新的UITableViewRow会使现有单元格下降得太快

ios - 遍历 UIView.subviews 获取按钮很快

iPhone 的 iOS 模拟器版本未显示错误的 console.log 输出

给定两个点的贝塞尔路径曲线动画的iOS计算控制点

ios - UIView.animate - Swift 3 - 完成

ios - UIView block 动画从左到右和向左移动 View

swift - 在 Xcode Playground 中制作动画时,位置元素与 super View 成比例