Skip to content

Instantly share code, notes, and snippets.

@barbaramartina
Created July 9, 2017 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barbaramartina/81e7ca24532e49433ae91be3181b350a to your computer and use it in GitHub Desktop.
Save barbaramartina/81e7ca24532e49433ae91be3181b350a to your computer and use it in GitHub Desktop.
Apply blur effect to a view in Swift 3
let effectView = UIVisualEffectView()
effectView.frame = view.bounds
effectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(effectView)
let e = UIBlurEffect(style: .dark)
effectView.effect = e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment