How can I make a view that is controlled by a tab bar fade in / out rather than flickering in / out?

I have a tab bar controller and a nice tab bar at the bottom of my application. There are three buttons. When I click one, then the view controller from that tab bar is "called" and the new view appears immediately. It knocks on the door very hard so everyone in the neighborhood can hear it. I would like to have a softer transition if possible. Something like fade out, fade out, or transition with page translation. What should I do for this?

0


a source to share


1 answer


You can try overriding the viewController method viewWillAppear

and implementing a view animation that, say, sets the alpha view to 0.0 and moves it down to 1.0 for a fade-out effect. Along the way, you can override viewWillDisappear

.



Keep in mind, however, that fancy page animations tend to age and sometimes get in the way after the novelty wears off. Most veteran users just want to go. When you're done doing something, you might want to set a custom setting that allows you to disable it.

0


a source







All Articles