LiveFrost icon indicating copy to clipboard operation
LiveFrost copied to clipboard

Feature Request: make blurradius animatable

Open getaaron opened this issue 12 years ago • 8 comments

I think this would require a significant rewrite. This is outside my area of expertise, so I'm not sure what the feasibility is. I think we'd have to extend CALayer instead of UIView (see http://stackoverflow.com/questions/2395382/animating-a-custom-property-of-calayer-subclass).

getaaron avatar Nov 19 '13 22:11 getaaron

I don’t think this will require a heavy rewrite. Note that what CAAnimation all does is to solve value at time. It is IMHO possible to — duh, exactly what your link mentioned. We can use a custom subclass and stash blur radius (kernel size) on it. I am not sure if it will be fast enough though.

On Nov 20, 2013, at 6:09 AM, Aaron Brager [email protected] wrote:

I think this would require a significant rewrite. This is outside my area of expertise, so I'm not sure what the feasibility is. I think we'd have to extend CALayer instead of UIView (see http://stackoverflow.com/questions/2395382/animating-a-custom-property-of-calayer-subclass ).

— Reply to this email directly or view it on GitHubhttps://github.com/radi/LiveFrost/issues/9 .

evadne avatar Nov 20 '13 00:11 evadne

What @evadne said, and we'd also have to override +layerClass on the UIView to return the class of the new CALayer subclass.

I'd like to avoid changing the existing interface, since nobody wants to update their project submodules and pods and — SURPRISE! — experience the fun and excitement of seeing their build break.

ghost avatar Nov 20 '13 02:11 ghost

For what it's worth, cross fading between blurred images does a really good job of simulating an animated blur radius. I'm normally pretty particular about how animations look, but even I had a hard time telling that the blur radius wasn't animating.

ghost avatar Dec 12 '13 07:12 ghost

I agree with @LucasTizma, in my project I'm simply fadeIn view.alpha, and it looks very good.

ArtFeel avatar Dec 12 '13 09:12 ArtFeel

The alpha fade looks good on some views, but it doesn't work as well on high contrast / sparsely populated views.

getaaron avatar Dec 12 '13 13:12 getaaron

To add my two cents, I do think that migrating to a CALayer subclass with a UIView subclass for an interface is the best long term solution. That should yield a few more benefits, like allowing us to keep the entire blur effect in lockstep with animation.

It's not quite as high on the list of priorities right now, but that would probably be our next major release, 2.0 or something like that.

As for blurradius, we do enough pre-caching that making blurradius animatable will probably be really, really slow. But I think it's still worth trying.

If it's too slow, there will just have to be another barrier in the interface to make sure that $DEVELOPER really, really wants to do this.

Kind of like trying to die in a LucasArts game.

ghost avatar Jan 18 '14 05:01 ghost

Yeah. Maybe the animated blurRadius Is only enabled if you win a round of Insult Swordfighting.

getaaron avatar Jan 18 '14 05:01 getaaron

Another thing that would make this nice is that the built in iOS8 UIBlurEffect still does not have an animatable radius. Search continues...

whitneyland avatar Feb 04 '15 19:02 whitneyland