I have two class A and B .
class A{
override func viewWillAppear(_ animated: Bool) { .
print("")
}
let myPost = self.storyboard?.instantiateViewController(withIdentifier: "Completed") as! Completed
myPost.transitioningDelegate = self as? UIViewControllerTransitioningDelegate
myPost.modalPresentationStyle = .custom
self.present(myPost, animated: true, completion: nil)
}
class B{ .
dismiss(animated: true, completion: nil)
}
Here I am presenting class B from class A. But when I am dismissing class B the viewWillApper (in class A) is not calling. How to achive this?