Question: I have a `UIView` that contains buttons and labels. When these buttons are pressed, this `UIView` will become blur using the code below. 

```
@IBOutlet weak var blurView: UIView!
var blurEffect = UIBlurEffect(style: UIBlurEffectStyle.Dark)
var blurEffectView = UIVisualEffectView(effect: blurEffect)
blurEffectView.frame = blurView.bounds
blurView.addSubview(blurEffectView)

```

However, I want to remove the blur effect later on. 
What is the code for removing the blurred `UIView`?

Answer: 
It's hard to know exactly what is going on in your code, as you've clearly posted a cut up version (the last 4 lines are part of a method somewhere, presumably).

You could do something like this to remove all `UIVisualEffectView` subviews from your `blurView`:

```
for subview in blurView.subviews {
    if subview is UIVisualEffectView {
        subview.removeFromSuperview()
    }
}

```
```
func addBlurEffect(view: UIView, style: UIBlurEffect.Style) {
    view.backgroundColor = UIColor.clear

    let blurEffect = UIBlurEffect(style: style)
    let blurEffectView = UIVisualEffectView(effect: blurEffect)
    blurEffectView.frame = view.bounds
    blurEffectView.tag = 9
    view.insertSubview(blurEffectView, at: 0)
}

func removeBlurEffect(view: UIView){
    view.viewWithTag(9)?.removeFromSuperview()
}

```