Is there any way I can make my subview to animate differently depending if it is appearing or disappearing?
Imagine I have a view with a rectangle subview, I want the rectangle to scale up when appearing, and scale down when disappearing.
IS there any way how can I do it?
subView.hero.modifiers = [
.when({ context in return context.isAppearing }, .scale(10)),
.when({ context in return context.isDisappearing }, .scale(0.1))
]
isAppearing and isDisappearing does not exist in context. Above is just an example, I have a more complex animation currently.
I have to set modifiers each time I am doing presentViewController, pushViewController, popViewController, dismissViewController, I am wondering if it is possible to do it just once on load
bumpppp
bumppppp
bump