Comments (11)
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.
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.
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.
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.
Yes, but that doesn't allow interactive scrubbing or reversing the animation.
from hero.
For that you have to set the blur with a UIViewPropertyAnimator and then scrub by setting it's progress
from hero.
But that's iOS 10+
from hero.
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.
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.
@lkzhao Actually the way you tried should work, check out this example project: https://github.com/fichek/AnimateBlurRadius/
from hero.
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)
- Animation not working for UICollectionViewDiffableDataSource HOT 1
- Request: Make HeroTransition::complete(after: TimeInterval, finishing: Bool) public
- Version 1.6.2 doesn't work with SPM HOT 16
- <Hero/Hero-Swift.h> file not found when I use “ pod 'Hero' ”.
- Animation doesn't work when navigationController pushing screen HOT 4
- OverFullScreen problem HOT 3
- HeroModifiers will fail when a nested `when` modifier exist
- 在tabbar控制器嵌套的navigation控制器中push进子页面,tabbar的显示/隐藏没有任何动画 HOT 2
- hero push animation is unable to turn off
- How do I keep the tabbar is not hidden when push
- Doesn't the demo project work? HOT 2
- Spring Modifier on dismiss view controller Hero.
- hidesBottomBarWhenPushed bug
- Demo cant be run.
- need help, match hero animation across multiple preseting viewcontollers HOT 1
- Default source code, why is there a black area at the top? HOT 2
- Black screen when removing VC
- CI/CD github action needs update to newer env
- Privacy Manifest HOT 1
- Library not loaded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hero.