我一直在尝试使用xcode 6(swift语言)中的UIImageView来实现模糊效果,我正在尝试实现它,因此ImageView下面的所有内容都会变得模糊.
我无法使它工作,所以我要求堆栈溢出的人帮助我,拜托.
怎么办?
我到目前为止写的代码是:
class blurImage: UIImageView {
init(frame: CGRect) {
super.init(frame: frame)
var blur:UIBlurEffect = UIBlurEffect(style: UIBlurEffectStyle.Light)
var effectView:UIVisualEffectView = UIVisualEffectView (effect: blur)
}
}
Run Code Online (Sandbox Code Playgroud)