Giter VIP home page Giter VIP logo

Comments (11)

jegnux avatar jegnux commented on May 21, 2024 1

If you set the UIVisualEffectView as your's UIViewController.view in loadView(), then the transition is automatically handled by UIKit. Maybe it'll solve your issue.

from hero.

fruitcoder avatar fruitcoder commented on May 21, 2024

I haven't looked at the exact code that peforms the animations, but is it possible to check for the views that are animated (traversing the view hierarchy)? Then every VisualEffectView's effect would be set to nil and reset in an animation block. That way it could be animated

from hero.

lkzhao avatar lkzhao commented on May 21, 2024

With the new .overFullScreen support. This should be possible. We just have to figure out how to animation UIVisualEffectView, since it doesn't support opacity animation.

from hero.

fruitcoder avatar fruitcoder commented on May 21, 2024

As I said UIVisualEffectView can animate its blur by setting the effect from nil to a blur effect in an animation block so you might have to make a special case if a view is a UIVisualEffectView and the opacity is to be animated

from hero.

lkzhao avatar lkzhao commented on May 21, 2024

Yes, but that doesn't allow interactive scrubbing or reversing the animation.

from hero.

fruitcoder avatar fruitcoder commented on May 21, 2024

For that you have to set the blur with a UIViewPropertyAnimator and then scrub by setting it's progress

from hero.

fruitcoder avatar fruitcoder commented on May 21, 2024

But that's iOS 10+

from hero.

lkzhao avatar lkzhao commented on May 21, 2024

I tried implementing the UIViewPropertyAnimator. I modify to menu example to have a blur background.

http://lkzhao.com/video/?path=%5Cpublic%5Cposts%5Chero%5Cmenu.mov

It doesn't works when it is interactive though. Whenever, I set the .fractionComplete, the blur effect immediately jumps to the end.

from hero.

felix-dumit avatar felix-dumit commented on May 21, 2024

Maybe if it's interactive you have to take a snapshot of the view and animate its alpha similar to the way I tried to do it?

from hero.

felix-dumit avatar felix-dumit commented on May 21, 2024

@lkzhao Actually the way you tried should work, check out this example project: https://github.com/fichek/AnimateBlurRadius/

from hero.

felix-dumit avatar felix-dumit commented on May 21, 2024

I think the problem is here: https://github.com/lkzhao/Hero/blob/master/Sources/HeroViewPropertyViewContext.swift#L59
Since it already starts the animation immediately, if it is interactive it shouldn't do that and only rely on the fractionComplete.

from hero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.