title: iOS blur effect to ImageView with Swift
body: <p>I am trying to make simple iOS app. I need to make image view with blur effect.
  I found this code on Stack Overflow:</p>
  
  <pre><code>class BlurImageView: UIImageView {
  
    override func awakeFromNib() {
      super.awakeFromNib()
    }
  
    required init(coder aDecoder: NSCoder!){
        super.init(coder: aDecoder)   
        var blur:UIBlurEffect = UIBlurEffect(style: UIBlurEffectStyle.Light)
        var effectView:UIVisualEffectView = UIVisualEffectView (effect: blur)
        effectView.frame = frame
        addSubview(effectView)
    }
  }
  </code></pre>
  
  <p>And I need to connect this class to my <code>image_view</code>, but I don't know how to do it.
  I try to do it in my <code>view_did_load</code> function in my <code>ViewController</code> (<code>image_view</code> is a outlet)</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      image_view = BlurImageView()
  }
  </code></pre>
  
  <p>but <code>NSCoder</code> required... What is it? maybe my way is a wrong way? </p>