Hi guys,
I have a simple UIImage animation, it works well but it can be called again mid animation, this runs the second go of animation over the first and looks a mess. I really want it so that it can only be called to animate again once it has finished animating. I'm guessing that I need to use the isAnimating BOOL but am not sure how to do this??
here is the code I have so far.
I think this may be simple for an experienced programmer but as a noob I'm finding it a bit tricky.
thanks
moomy
I have a simple UIImage animation, it works well but it can be called again mid animation, this runs the second go of animation over the first and looks a mess. I really want it so that it can only be called to animate again once it has finished animating. I'm guessing that I need to use the isAnimating BOOL but am not sure how to do this??
here is the code I have so far.
Code:
-(IBAction) aura{
NSArray * auraArray = [[NSArray alloc] initWithObjects:
// [UIImage imageNamed:@"smallblink.png"],
[UIImage imageNamed:@"aura1.png"],
[UIImage imageNamed:@"aura1-2.png"],
[UIImage imageNamed:@"aura1-2-3.png"],
[UIImage imageNamed:@"aura1-2-3-4.png"],
[UIImage imageNamed:@"aura1-2-3-4-5.png"],
[UIImage imageNamed:@"evenmoreAura.png"],
[UIImage imageNamed:@"evenmoreAura.png"],
[UIImage imageNamed:@"evenmoreAura.png"],
[UIImage imageNamed:@"evenmoreAura.png"],
[UIImage imageNamed:@"aura1-2-3-4-5.png"],
[UIImage imageNamed:@"aura1-2-3-4.png"],
[UIImage imageNamed:@"aura1-2-3.png"],
[UIImage imageNamed:@"aura1-2.png"],
//[UIImage imageNamed:@"biggyshock.png"],
nil];
UIImageView * aura = [[UIImageView alloc] initWithFrame:CGRectMake(100, 40, 90, 20)];
aura.animationImages = auraArray;
aura.animationDuration = 1.30;
aura.animationRepeatCount = 1;
aura.contentMode = UIViewContentModeTop;
[self.view addSubview:aura];
[aura startAnimating];
[aura release];
[auraArray release];
}
I think this may be simple for an experienced programmer but as a noob I'm finding it a bit tricky.
thanks
moomy