title: Adding blur effect to background in swift
body: <p>I am setting a background image to view controller. But also i want to add blur effect to this background. How can I do this?</p>
  
  <p>I am setting background with following code:</p>
  
  <pre><code>self.view.backgroundColor = UIColor(patternImage: UIImage(named: "testBg")!)
  </code></pre>
  
  <p>I found on internet for blur imageview how can i implement this to my background?</p>
  
  <pre><code>var darkBlur = UIBlurEffect(style: UIBlurEffectStyle.Dark)
  // 2
  var blurView = UIVisualEffectView(effect: darkBlur)
  blurView.frame = imageView.bounds
  // 3
  imageView.addSubview(blurView)
  </code></pre>