У меня есть два класса А и В.
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)
}
Здесь я представляю класс B из класса A. Но когда я исключаю класс B, viewWillApper (в классе A) не вызывает. Как этого добиться?