animationDidStop method called immediately
<p>I've never had this issue come up before. my animationDidStop method is being called before the animation actually completes.  animationDidStart gets called first, but then animationDidStop is called immediately after.  I tried to handle this using an animation completion block, but it called the animation completed immediately still.  Anybody run across this before?  I really could use a bit of help.  THANK YOU.</p>

<p>-James</p>

<p>CODE:</p>

<pre><code>-(void) runAnimation {

//Create an animation that rotates the tile

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[animation setDuration:6];
[animation setFromValue:[NSNumber numberWithFloat:0]];
[animation setToValue:[NSNumber numberWithFloat:0.5*M_PI]];
[animation setDelegate:self];
animation.fillMode = kCAFillModeForwards;
animation.removedOnCompletion = NO;

[[self.view viewWithTag:100].layer addAnimation:animation forKey:@"solutionRotate"];

}

-(void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
{

        if (theAnimation == [[self.view viewWithTag:100].layer animationForKey:@"solutionRotate"]){

            //test
            NSLog (@"test");

    }

}
</code></pre>