title: How to add a shadow and CAShapeLayer to the same UIView
body: <p>I'm trying to add a 6px radius to the bottom left and right corners of my view <code>innerView</code>, as well as a shadow to the whole of <code>innerView</code>. <code>innerView</code> is enclosed in a view called <code>view2</code>. </p>
  
  <p>The only way I can get this to work is by using the following code:</p>
  
  <pre><code>let containerLayer = CALayer()
  containerLayer.shadowColor = UIColor.blackColor().CGColor
  containerLayer.shadowOffset = CGSizeMake(1, 2)
  containerLayer.shadowOpacity = 0.2
  containerLayer.shadowRadius = 2
  
  let maskPath = UIBezierPath(roundedRect: innerView.bounds, byRoundingCorners: UIRectCorner.BottomLeft.union(.BottomRight), cornerRadii: CGSize(width: 6, height: 6)).CGPath
  
  let maskLayer = CAShapeLayer()
  maskLayer.path = maskPath
  innerView.layer.mask = maskLayer
  containerLayer.addSublayer(innerView.layer)
  view2.layer.addSublayer(containerLayer)
  </code></pre>
  
  <p>However, since <code>view2</code> is actually the contentView of a <code>UITableViewCell</code>, this code disables scrolling of the <code>UITableView</code> when dragging on <code>containerLayer</code>...</p>