Created
July 9, 2017 12:19
-
-
Save barbaramartina/81e7ca24532e49433ae91be3181b350a to your computer and use it in GitHub Desktop.
Apply blur effect to a view in Swift 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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