UIImageView焦点效果
UIImageView focus effect
有谁知道如何给 UIImageView 添加焦点效果,这样背景会有点模糊。下面是一个示例图片
图片来源:http://cdn-media-2.lifehack.org/wp-content/files/2011/09/focus1.jpg
你应该使用 UIBlurEffect。
var vEffect = UIVisualEffectView(effect: UIBlurEffect(style: .Light))
vEffect.frame = imageView.bounds
imageView.addSubview(visualEffectView)
在 GitHub 中找到了这个。 "You can use blur effect and it's animation easily to call only two methods."
https://github.com/marty-suzuki/SABlurImageView
您好,我刚刚使用 CLImageEditor in Objective-C. You can download my demo for your use from https://github.com/nitingohel/NGFocusView
开发了一个演示项目
运行时输出为:
有谁知道如何给 UIImageView 添加焦点效果,这样背景会有点模糊。下面是一个示例图片
图片来源:http://cdn-media-2.lifehack.org/wp-content/files/2011/09/focus1.jpg
你应该使用 UIBlurEffect。
var vEffect = UIVisualEffectView(effect: UIBlurEffect(style: .Light))
vEffect.frame = imageView.bounds
imageView.addSubview(visualEffectView)
在 GitHub 中找到了这个。 "You can use blur effect and it's animation easily to call only two methods." https://github.com/marty-suzuki/SABlurImageView
您好,我刚刚使用 CLImageEditor in Objective-C. You can download my demo for your use from https://github.com/nitingohel/NGFocusView
开发了一个演示项目运行时输出为: