I used the Objective-C code below to pop a specific ViewController.
Objective-C
ViewController
for (UIViewController *controller in self.navigationController.
Swift 4 / Swift 5
for controller in self.navigationController!.viewControllers as Array { if controller.isKind(of: HomeViewController.self) { self.navigationController!.popToViewController(controller, animated: true) break } }