Created
April 26, 2018 12:54
-
-
Save christopherkarani/96fffd38a15348456f542af7c6cdc7d4 to your computer and use it in GitHub Desktop.
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
if !UIAccessibilityIsReduceTransparencyEnabled() { | |
view.backgroundColor = .clear | |
let blurEffect = UIBlurEffect(style: .dark) | |
let blurEffectView = UIVisualEffectView(effect: blurEffect) | |
//always fill the view | |
blurEffectView.frame = self.view.bounds | |
blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight] | |
view.addSubview(blurEffectView) //if you have more UIViews, use an insertSubview API to place it where needed | |
} else { | |
view.backgroundColor = .black | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment