title: UICollectionViewCell with rounded corners AND drop shadow not working
body: <p>I want my UICollectionViewCells to have rounded corners and drop shadows but I have run into a problem where it seems I can only have one or the other, but not both.</p>
  
  <p>To just round the corners I use this code in the initialization of the cell:</p>
  
  <pre><code>CALayer *layer = [self layer];
  [layer setCornerRadius:4];
  [layer setRasterizationScale:[[UIScreen mainScreen] scale]];
  [layer setShouldRasterize:YES];
  </code></pre>
  
  <p>To just add a drop shadow I use this code in the initialization of the cell:</p>
  
  <pre><code>CALayer *layer = [self layer];
  [layer setMasksToBounds:NO];
  [layer setRasterizationScale:[[UIScreen mainScreen] scale]];
  [layer setShouldRasterize:YES];
  [layer setShadowColor:[[UIColor blackColor] CGColor]];
  [layer setShadowOffset:CGSizeMake(0.0f,0.5f)];
  [layer setShadowRadius:8.0f];
  [layer setShadowOpacity:0.2f];
  [layer setShadowPath:[[UIBezierPath bezierPathWithRoundedRect:self.bounds cornerRadius:layer.cornerRadius] CGPath]];
  </code></pre>
  
  <p>To try and have rounded corners and a drop shadow I use this code in the initialization of the cell:</p>
  
  <pre><code>CALayer *layer = [self layer];
  [layer setMasksToBounds:NO];
  [layer setCornerRadius:4];
  [layer setRasterizationScale:[[UIScreen mainScreen] scale]];
  [layer setShouldRasterize:YES];
  [layer setShadowColor:[[UIColor blackColor] CGColor]];
  [layer setShadowOffset:CGSizeMake(0.0f,0.5f)];
  [layer setShadowRadius:8.0f];
  [layer setShadowOpacity:0.2f];
  [layer setShadowPath:[[UIBezierPath bezierPathWithRoundedRect:self.bounds cornerRadius:layer.cornerRadius] CGPath]];
  </code></pre>
  
  <p>but this results in the drop shadow only.</p>
  
  <p>Is this a bug or am I doing something wrong?</p>