title: How to rotate an UIImageView with CATransform3DRotate make an effect like Door Opening?
body: <p>I've read and try this <a href="https://stackoverflow.com/questions/5254552/opening-door-effect-using-core-animation">article (Opening door effect using Core Animation)</a></p>
  
  <p>And I implement following code in my app:</p>
  
  <pre><code>    CALayer *layer = threeHomeView.layer;
  CATransform3D initialTransform = threeHomeView.layer.transform;
  initialTransform.m34 = 1.0 / -900;
  
  [UIView beginAnimations:@"Scale" context:nil];
  [UIView setAnimationDuration:3];
  layer.transform = initialTransform;
  CATransform3D rotationAndPerspectiveTransform = threeHomeView.layer.transform;
  
  rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform
                                                        , 40.0f * M_PI / 180.0f
                                                        , 0.0f
                                                        , 1.0f
                                                        , 0.0f);
  layer.transform = rotationAndPerspectiveTransform;
  
  [UIView setAnimationDelegate:self];
  [UIView setAnimationDidStopSelector:@selector(threeHomeFlyOut)];
  [UIView commitAnimations];  
  </code></pre>
  
  <p>threeHomeView is an UIImageView. </p>
  
  <p>MY QUESTION IS: the image can only rotate by middle vertical line of the image, but I want it to rotate by left vertical line of the image.</p>