Created
July 6, 2015 11:15
Revisions
-
vparihar01 created this gist
Jul 6, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ // Blur Effect var blurEffect = UIBlurEffect(style: UIBlurEffectStyle.Dark) var blurEffectView = UIVisualEffectView(effect: blurEffect) blurEffectView.frame = view.bounds view.addSubview(blurEffectView) // Vibrancy Effect var vibrancyEffect = UIVibrancyEffect(forBlurEffect: blurEffect) var vibrancyEffectView = UIVisualEffectView(effect: vibrancyEffect) vibrancyEffectView.frame = view.bounds // Label for vibrant text var vibrantLabel = UILabel() vibrantLabel.text = "Vibrant" vibrantLabel.font = UIFont.systemFontOfSize(72.0) vibrantLabel.sizeToFit() vibrantLabel.center = view.center // Add label to the vibrancy view vibrancyEffectView.contentView.addSubview(vibrantLabel) // Add the vibrancy view to the blur view blurEffectView.contentView.addSubview(vibrancyEffectView)