title: Shadow not appearing for UIView using CALayer
body: <p>I have a subclassed <code>UIView</code> loaded from a nib, and I cannot get a shadow to draw around it.  I'm trying to get a shadow to appear around the entire view for quite some time now.  I elected to place it in it's own sublayer to simplify animating it later.  Here's the code:</p>
  
  <pre><code>-(void)awakeFromNib 
  {
      self.clipsToBounds = NO;
  
      // set up the shadow layer
      CALayer *shadow = [CALayer layer];
      shadow.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.bounds.size.width, self.bounds.size.height);
      shadow.shadowColor = [UIColor blueColor].CGColor;
      shadow.shadowRadius = 15.0;
      shadow.opacity = 1.0;
      [self.layer addSublayer:shadow];
      // I set this property so I have access to it later to more easily animate it.
      self.shadowLayer = shadow;
  }
  </code></pre>
  
  <p>When I <code>NSLog</code> the <code>shadowLayer</code> property, the coordinates and frame are correct.  It's matches the view it's backing.</p>
  
  <p>I also set a border color and corner radius on <code>self.layer</code> and it appears correctly.  If I put the shadow on <code>self.layer</code> it appears but it encompasses all the subviews of my parent <code>UIView</code>.</p>
  
  <p>Any help is greatly appreciated.</p>