Hey,
I got a question, I know how "normal" deallocation works and now Iam trying it a bit with ViewControllers,
but no matter what I do nothing works.
I tried it with an empty inital ViewController who just presents another,
but the inital one is still in the memory.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ animated: Bool) {
dismiss(animated: true)
present(TestController(), animated: true)
}
deinit {
print("deinit")
}
}
So how do I get this ViewController deallocated when Iam presenting the new one ?