我使用一个UIImage的动画,它是引起了无数内存泄漏和使用应用程序的不同用户的崩溃。
下面是我的代码。 我在预加载的viewDidAppear组两个动画
pointsView.image = [UIImage的imageNamed:@ “C72.png”];
NSMutableArray *menuanimationImages = [[NSMutableArray alloc] initWithCapacity:21];
NSString *imageName;
for( int aniCount = 0; aniCount < 72; aniCount++ )
{
imageName = [NSString stringWithFormat:@"C%d.png", aniCount];
[menuanimationImages addObject:[UIImage imageNamed:imageName]];
}
pointsView.animationImages = menuanimationImages;
pointsView2.image = [UIImage imageNamed:@"I72.png"];
NSMutableArray *menuanimationImagess = [[NSMutableArray alloc] initWithCapacity:21];
NSString *imageNames;
for( int aniCounts = 0; aniCounts < 72; aniCounts++ )
{
imageNames = [NSString stringWithFormat:@"I%d.png", aniCounts];
[menuanimationImagess addObject:[UIImage imageNamed:imageNames]];
}
pointsView2.animationImages = menuanimationImagess;
}
我然后使用运行动画
pointsView.animationDuration = 3.11;
pointsView.animationRepeatCount = 1;
[pointsView startAnimating];
有什么建议?