I have an app, with a lot of views and subviews.
In my app delegate, I open a subview each time I receive a notification. I made a lot of tests : - the notifications are always received well. - the subview is always well created, it's never at nil.
But after a notification or two, the subviews do not show again, even if they exist and are well created in memory.
I think I am doing something wrong with the memory and I probably misunderstood something with the view hierarchy.
Here is the code that create and add the subview :
@property (retain, nonatomic) ViewControllerNewOrder *sub;
sub = [[ViewControllerDriverNewOrder alloc] init]; sub = [mainStoryboard instantiateViewControllerWithIdentifier:@"ViewControllerNewOrder"]; sub.view.frame = self.initialViewController.view.bounds; [self.initialViewController.view addSubview:sub.view];
Thank you for your time and your help !</div