title: Flip transition in iPhone
body: <p>I am facing problems in flipping views in iPhone.</p>
  
  <p>I have two views in appDelegate. I want to flip them once user clicks on a button.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>CATransition *transition = [CATransition animation];
  
  transition.duration = 0.75;
  [transition @"twist"];
  [transition setSubtype:@"fromRight"];
  
  transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
  [transition setFillMode:@"extended"];
  
  [[window layer] addAnimation:transition forKey:nil];
  
  
  [window addSubview:self.s.view];
  [CATransaction commit];
  </code></pre>
  
  <p>But this is not working. Do anybody knows a better way to flip the views on window side.</p>
  
  <p>What I am doing is calling the method from appDelegate in the respective viewControllers to flip the views.</p>