Proper implementation with UIViewControllerTransitioningDelegate.