title: How do i build 3D transform in iOS for ECSlidingViewController?
body: <p>I want to build a some special animation based <a href="https://github.com/ECSlidingViewController/ECSlidingViewController" rel="nofollow noreferrer">https://github.com/ECSlidingViewController/ECSlidingViewController</a>.</p>
  
  <p>The Zoom animation is like below image.</p>
  
  <p><img src="https://i.stack.imgur.com/PeRHW.png" alt="enter image description here"></p>
  
  <p>I just want to rotate the main view controller by PI / 4. Like below image.</p>
  
  <p><img src="https://i.stack.imgur.com/zxH31.png" alt="enter image description here"></p>
  
  <p>I had tried to EndState transform like below code, but it doesn't work.</p>
  
  <pre><code>- (void)topViewAnchorRightEndState:(UIView *)topView anchoredFrame:(CGRect)anchoredFrame {
  
  CATransform3D toViewRotationPerspectiveTrans = CATransform3DIdentity;
  toViewRotationPerspectiveTrans.m34 = -0.003;
  toViewRotationPerspectiveTrans = CATransform3DRotate(toViewRotationPerspectiveTrans, M_PI_4, 0.0f, -1.0f, 0.0f);
  
  topView.layer.transform = toViewRotationPerspectiveTrans;
  topView.layer.position = CGPointMake(anchoredFrame.origin.x + ((topView.layer.bounds.size.width * MEZoomAnimationScaleFactor) / 2), topView.layer.position.y);
  }
  </code></pre>
  
  <p>Any help, pointers or example code snippets would be really appreciated!</p>