Skip to content

Instantly share code, notes, and snippets.

View vdeep's full-sized avatar
🎯
Focusing

Vishal Kanojia vdeep

🎯
Focusing
  • Punjab, India
View GitHub Profile
@vdeep
vdeep / UINavigationController+Extension.swift
Created June 15, 2022 12:31
Completion block support for UINavigationController push and pop methods
import UIKit
extension UINavigationController {
func pushViewController(viewController: UIViewController, animated: Bool, completion: @escaping () -> Void) {
pushViewController(viewController, animated: animated)
if animated, let coordinator = transitionCoordinator {
coordinator.animate(alongsideTransition: nil) { _ in
completion()
}