title: Custom Segue push weird behavior
body: <p>I am trying a simple project (storyboard) where the user swipes from right to left to get to the next view and so on and to go back the user swipes from left to right.
  I want to achieve the transition to follow the swipe (L-->R or R-->L).</p>
  
  <p>I have found this:</p>
  
  <pre><code>-(void)perform {
  
      UIViewController *sourceViewController = (UIViewController*)[self sourceViewController];
      UIViewController *destinationController = (UIViewController*)[self destinationViewController];
  
      CATransition* transition = [CATransition animation];
      transition.duration = .25;
      transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
      transition.type = kCATransitionPush; //kCATransitionMoveIn; //, kCATransitionPush, kCATransitionReveal, kCATransitionFade
      transition.subtype = kCATransitionFromLeft; //kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromBottom
  
  
  
      [sourceViewController.navigationController.view.layer addAnimation:transition
                                                                  forKey:kCATransition];
  
      [sourceViewController.navigationController pushViewController:destinationController animated:NO];
  
  }
  </code></pre>
  
  <p>but this doesn't seem to be doing what is supposed to do.</p>
  
  <p><strong>EXPLAIN:</strong></p>
  
  <p>when i m in landscape (my project only works in landscape) and home button is on the left, the animation comes from the TOP!!!
  When I m in landscape and home button is on the right the animation comes from the BOTTOM!!!</p>
  
  <p>Although I have specified it to be from the left.
  The other thing is that it changes direction when i use diferent landscapes (homebutton on the left or right).</p>
  
  <p>Any ideas why is this happening???</p>