Skip to content

Instantly share code, notes, and snippets.

@chuganzy
Created January 13, 2016 12:22
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 chuganzy/706aba95917b2993d584 to your computer and use it in GitHub Desktop.
Save chuganzy/706aba95917b2993d584 to your computer and use it in GitHub Desktop.
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