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?
I am setting background with following
This Code is Working Fine For me! its for Swift 4.x
let blurEffect = UIBlurEffect(style: .ExtraLight) let blurEffectView = UIVisualEffectView(effect: blurEffect) blurEffectView.frame = self.view.frame self.view.insertSubview(blurEffectView, atIndex: 0)