Created
January 13, 2016 12:22
-
-
Save chuganzy/706aba95917b2993d584 to your computer and use it in GitHub Desktop.
This file contains 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
extension UIVisualEffectView { | |
var effectColor: UIColor? { | |
get { | |
return self.colorEffectView()?.backgroundColor | |
} | |
set { | |
self.colorEffectView()?.backgroundColor = newValue | |
} | |
} | |
private func colorEffectView() -> UIView? { | |
return self.subviews.lazy.filter { (view) -> Bool in | |
return NSStringFromClass(view.dynamicType) == "_UIVisualEffectFilterView" | |
}.first | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment