我对UIImageView animationRepeatCount属性有疑问。
UIImageView *exploze1 =[[UIImageView alloc]
initWithFrame:CGRectMake(150,150,64,64)];
NSArray *imageNames999 = @[@"raketka0000.png", @"raketka0001.png", @"raketka0002.png", @"raketka0003.png"];
NSMutableArray *images999 = [[NSMutableArray alloc] init];
for (int i = 0; i < imageNames999.count; i++)
{
[images999 addObject:[UIImage imageNamed:
[imageNames999 objectAtIndex:i]]];
}
exploze1.animationImages = images999;
exploze1.animationDuration = 4;
exploze1.animationRepeatCount=0;
[self.view addSubview:exploze1];
[exploze1 startAnimating];
如果我将animationRepeatCount更改为非零值,则该动画无效。如果将其更改为零(无限循环),则一切正常。你能帮我吗?
例如,我尝试将addSubview和startAnimation放入-(void)viewDidAppear:(BOOL)动画...但没有更改。