Skip to content

Instantly share code, notes, and snippets.

@zwaldowski
Created December 12, 2016 20:42
Show Gist options
  • Save zwaldowski/99e21335d00b2cfe20f8e06fe0c4bb4a to your computer and use it in GitHub Desktop.
Save zwaldowski/99e21335d00b2cfe20f8e06fe0c4bb4a to your computer and use it in GitHub Desktop.
import UIKit
extension UINavigationController {
func pushViewController(_ viewController: UIViewController, animated: Bool = true, completion: @escaping(Void) -> Void) {
pushViewController(viewController, animated: animated)
guard animated, let coordinator = transitionCoordinator else {
completion()
return
}
coordinator.animate(alongsideTransition: nil, completion: { _ in
completion()
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment