iOS10 UIView blur effect with shadow
<p>how to have a blur effect on UIView with shadow? If I do:</p>

<pre><code>    override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
    let layer = self.view.layer;
    layer.shadowColor = UIColor.black.cgColor
    layer.shadowOpacity = 1.0
    layer.shadowOffset = CGSize(width: 0.0, height: 0.5)
    layer.shadowRadius = 5.0

    self.view.backgroundColor = UIColor.clear

    let blurEffect = UIBlurEffect(style: .light)
    let sideEffectView = UIVisualEffectView(effect: blurEffect)
    sideEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

    sideEffectView.frame = self.view.bounds;
    self.view.addSubview(sideEffectView)
}
</code></pre>

<p>There is a shadow but no blur effect, and if I do this:</p>

<pre><code>    override func viewDidLoad() {
    super.viewDidLoad()

    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.clear

    let blurEffect = UIBlurEffect(style: .light)
    let sideEffectView = UIVisualEffectView(effect: blurEffect)
    sideEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

    sideEffectView.frame = self.view.bounds;
    self.view.addSubview(sideEffectView)
}
</code></pre>

<p>There is a blur effect but no shadow.</p>

<p>Thanks for help!</p>