title: Swift - drop shadow on the masked image in the table row
body: <p>here is a situation.
  I've created a storyboard and UIViewController. To UIViewController I've added UITableView. To UITableView I've registered custom TableViewCell in which I need to add a rounded image and drop shadow from it.
  I've created UIView and added to it UIImageView. For UIView I've created file with the following code:</p>
  <pre><code>class drawView: UIView {
  override func draw(_ rect: CGRect) {
      super.draw(rect)
      guard let context = UIGraphicsGetCurrentContext() else {
          return
      }
      self.drawCircle(context)
  }
  private func drawCircle(_ context: CGContext){
      context.setStrokeColor(UIColor.black.cgColor)
      let newMask = CAShapeLayer()
      let circlePath = UIBezierPath(ovalIn: .init(x: 0, y: 0, width: 50, height: 50))
      newMask.path = circlePath.cgPath
      self.layer.mask = newMask //if I comment this line then the shadows works properly, if not, there is no shadows
      self.layer.shadowColor = UIColor.black.cgColor
      self.layer.shadowOpacity = 0.5
      self.layer.shadowOffset = .init(width: 10, height: -10)
      self.layer.shadowRadius = 2
  }
  </code></pre>
  <p>}</p>
  <p>How can I make rounded image and rounded shadow from it in the table row?
  Thanks in advance for help.</p>