Conversation
|
Before reviewing the code — I have a hunch that instead of animating the blur kernel, it is better to cross-face two images with different blur radii. |
There was a problem hiding this comment.
Headers are not included in this project by default, so we need to either add this to all files or remove ones introduced.
There was a problem hiding this comment.
I'm not quite sure what you mean. LFGlassView.h inherits from LFGlassLayer.h, though that could be moved to the implementation file and the header could see only a class definition for the LFGlassLayer instance.
There was a problem hiding this comment.
Sorry, the “Copyright” declaration block.
There was a problem hiding this comment.
I believe that's already been covered, as far as applying that copyright header to every interface and implementation file. Unless there are some additional files that I've missed.
|
❤️ TBD: LiveFrost Sample + kernel slider + iPhone 4S |
|
I think you're right about cross-fading two images with different blur radii and scale factors. My suspicion is that's what's happening on the lock screen in iOS 7. I don't see a very clean way of adding that as an at run-time API right at this very instant. I'll probably pull out the current blurring bits in the meantime, as it's better to "not work" than "not work well". |
|
Regarding cross-fading that can be done as a |
|
Have the view (or even the layer) spawn an extra layer and do the That might work, probably should. Just copy, blur once, and use the copy as the "from" state while the "to" state (the current layer) lives on. I'll give that a shot after dentist. |
…t of messages from the view to the layer.
|
That blur radius bit was even simpler than I imagined. Thanks for the suggestion, @evadne . |
Soooo. Consider this a work in progress, though this is as far as I've gotten with about a day's worth of work.
Animating blurRadius didn't yield as many benefits as I'd hoped. Part of the problem is that our blur kernel, which Accelerate takes in, accepts odd integers. So the scaling between various levels of blurring is not... smooth. It's chunky. Argh.
You can try working with blur radius and scale factor to get something to animate, but the results aren't pretty. I'm not really sure where to begin, for that matter, with animating scale factor because Core Animation custom parameters don't offer nearly the level of customization that I want.
Besides beating myself up over that, there's also now an option in the LFGlassLayer to offer custom frames, bounds, positioning (think like "center"), anchor points, and target layers, so that should resolve the LONG AWAITED PR #4.
That looks pretty good, and there's lots of helper code to help make that feature easy to use. I hope folks like it.