I want to display particular ViewController, let say defaultViewController, whenever the user leaves from any ViewController.
So in the didEnterForeground I have added this code,
self.DefaultViewController = [[DefaultViewController alloc] initWithNibName:@"DefaultViewController" bundle:nil];
self.window.rootViewController = _defaultViewController;
[self.window makeKeyAndVisible];
And this works fine, but I want to make sure what I am doing is right. And whether this will result in any memory problem ? as I am not bothering the ViewController which is last used in the didEnterForeGround.
Please !!