title: Objective-c Control Transform Rotation
body: <p>I have an image grid that I am zooming in and zooming out on click of the image.  All is working fine, but I am having trouble controlling the rotation of the CGAffineTransform.  I thought I could pass in the angle to control how my rotation is determined, but when I do so, the transform will not zoom in and I am left zoomed out.<br>
  I feel that I have missed the proper implementation of this along somewhere during creating my routine, so if anyone can point out where I went wrong I would appreciate it
  Here is my code</p>
  
  <pre><code>     float angle =  -1.661799;
  
       if(status == 0){
               [UIView animateWithDuration:1.5f delay:0.0f
                 options:UIViewAnimationOptionCurveEaseIn animations:^{
                    CGAffineTransform totalTransform =
                    CGAffineTransformMakeTranslation(-middleX  , -middleY );
                    totalTransform = CGAffineTransformScale(totalTransform, 3.5f, 3.5f);
                    totalTransform = CGAffineTransformTranslate(totalTransform, middleX , middleY );
                    //totalTransform = CGAffineTransformMakeRotation(angle);
                   [self.view setTransform:totalTransform];
               }completion:^(BOOL finished) {
               }];
              status++;
       }else{
              [UIView animateWithDuration:1.3f delay:0.0f 
                 options:UIViewAnimationOptionCurveEaseIn animations:^{
  
                    CGAffineTransform tr = CGAffineTransformMakeScale(1.00 ,1.00);
                    [self.view setTransform:tr];
                  }completion:^(BOOL finished) {
  
                    [UIView animateWithDuration:1.3f delay:0.0f 
                    options:UIViewAnimationOptionCurveEaseIn animations:^{
                          CGAffineTransform totalTransform =
                          CGAffineTransformMakeTranslation(-middleX  , -middleY );
                          totalTransform = CGAffineTransformScale(totalTransform, 3.5f, 3.5f);
                          totalTransform = CGAffineTransformTranslate(totalTransform, middleX , middleY );
                          //totalTransform = CGAffineTransformMakeRotation(angle);
                          [self.view setTransform:totalTransform];
                     }completion:^(BOOL finished) {}];
  
                 }];
                 status = 0;
        }
  </code></pre>