I have found many ways to pop back 2 UIViewControllers
in UINavigationController
using Objective-C, however when I try and switch that over to Swift it
user5320485 answer in swift3
let viewControllers = self.navigationController!.viewControllers as [UIViewController];
for aViewController:UIViewController in viewControllers {
if aViewController.isKind(of: AdCreateViewController.self) {
_ = self.navigationController?.popToViewController(aViewController, animated: true)
}
}