我想釋放我的應用程序內存,並希望從內存中完全刪除loadImageView,當我點擊一個按鈕。我該怎麼做呢?如何從內存中完全刪除UIImageView動畫?
-(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];
}
-(IBAction)removeFromMemory {
//What do I add here?
}
謝謝!
'loadingImageView.animationRepeatCount = 0; //無限重複# – beryllium