I added to my UIViewController the code below:
deinit {
print("DEINIT")
}
And then i used the code below:
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewControllerWithIdentifier("newViewController") as! MultiGameView
self.presentViewController(nextViewController, animated:true, completion:nil)
But the deinit of the view controller didn't happen, what am i missing here?
My problem is that after i go back to the main viewcontroller, and then again to newViewController, the newViewController hasn't been deinit so his properties stay as they were and his variables too...