Added reversal of animation when dismissing

Added a flag to TransitionManager to check if we should animate present
or dismiss the view controller and updated animateTransition
accordingly