title: CALayer - Shadow causes a performance hit?
body: <p>So I am doing some custom animations on my navigationcontroller and the way it pushes and pops the viewControllers.</p>
  
  <p>Everything runs smooth. As soon as I add the following code (In a subclass of <code>UINavigationController</code>), I face a huge performance hit. After adding a shadow all animations become very laggy. Is this expected or am I doing something wrong in the code?</p>
  
  <pre><code>// This code gets called once during NavigationController initialization.
  [self.view setClipsToBounds:NO];
  [self.view.layer setCornerRadius:5];
  [self.view.layer setShadowOffset:CGSizeMake(0, 20)];
  [self.view.layer setShadowColor:[[UIColor yellowColor] CGColor]];
  [self.view.layer setShadowRadius:20.0];
  [self.view.layer setShadowOpacity:1];
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Changed my shadow radius to 1 and it's still slow</p>