UIGestureRecognizerStateEnded not getting registered upon ending of an object's rotation

I’m wanting to have the last “if” statement in the following code snippet, get processed when my object’s rotation ends.

-(void)rotate:(UIRotationGestureRecognizer *)sender{
   NSLog(@"Rotation- %@, iteration- %d", sender, n);
   if (sender.state== UIGestureRecognizerStateBegan) {
     NSLog(@"began- %f, iteration- %d", sender.rotation, n);
   }
   else if(sender.state== UIGestureRecognizerStateChanged){
    NSLog(@"changed- %f, iteration- %d", sender.rotation, n);
    newRotation= sender.rotation;  
    sender.view.transform= CGAffineTransformMakeRotation(newRotation);
    if(newRotation>= 2*M_PI*n+2*M_PI){
       n++;
      NSLog(@"current iteration- %d, rotation- %f, angle swept- %f", n, sender.rotation, 2*M_PI*n+2*M_PI);
     }
  }
   else if (sender.state== UIGestureRecognizerStateEnded){
     NSLog(@"ended- %f", sender.rotation);
   }
}

In the above code, the first 2 “if” statements are getting registered when the object is made to begin to rotate (touch begins gesture) and when it actually undergoes rotation (changes in continuous touch gesture). This all happens when the “rotate” message is received by a UIRotationGestureRecognizer object. However, the third “if” statement (UIGestureRecognizerStateEnded) is, often, not getting registered when the same “rotate” message is passed upon the ending of rotation. In fact, it often works, only when I perform a separate touch gesture afterward so that the gesture state then changes from “UIGestureRecognizerStateBegan” to “UIGestureRecognizerStateEnded”.
My concern is that the transition from “UIGestureRecognizerStateChanged” to “UIGestureRecognizerStateEnded”, often, doesn’t happen.

Any useful suggestion or workaround to address this issue would be most welcome.