Conversation
| public extension UIImage { | ||
| public func applyLightEffect() -> UIImage? { | ||
| return applyBlurWithRadius(30, tintColor: UIColor(white: 1.0, alpha: 0.3), saturationDeltaFactor: 1.8) | ||
| public func applyLightEffect(radius: CGFloat) -> UIImage? { |
There was a problem hiding this comment.
It has the same radius as UIBlurEffectStyleLight. You mustn't change radius here
There was a problem hiding this comment.
In my project I don't want to use default UIBlurEffectStyleLight, so why not another value?
There was a problem hiding this comment.
You should create a new effect instead of changing this one
| setupSubviews() | ||
| } | ||
|
|
||
| init(image: UIImage?, radius: CGFloat) { |
There was a problem hiding this comment.
If should have a default radius to not break API
There was a problem hiding this comment.
let defaultRadius: CGFloat = 30 (line 25) is the default radius.
|
Hi @klevison. Thanks for the PR. I'm not sure if it's should be merged to the repo |
|
Ok whether you don't want to merge it, but for me it was very useful. I just want to use a custom radius :) |
|
The first version was implemented with UIVisualEffectView and you can't change radius there. But UIVisualEffectView doesn't work properly on iOS 10, so it's just a temporary solution |
|
Its ok |
Radius property created to change blur level of preview image. Demo project changed.