Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The window expects to have a root view controlled by its rootViewController property. When returning from the background the window only asks for the rootViewController to restore the appearance of that view controller's view. It doesn't ask all subviews to refresh.</p> <p>To fix this I would create a new root view controller. This would have the banner and the navigation controller. That navigation controller would then hold your normal view controllers and manage the navigation. The banner will appear properly upon the app returning from the background. Your banner will be stationary while navigation occurs within the navigation controller.</p> <p><strong>Edit:</strong> I whipped up a little example program.</p> <p>I started with a simple single view app template. I added two view controllers for the content. The just have labels for differentiation, and one has a button that loads the second view.</p> <p>All the magic happens in the main view controller's viewDidLoad method:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. OneViewController *oneVC = [[OneViewController alloc] initWithNibName:@"OneViewController" bundle:nil]; self.navController = [[UINavigationController alloc]initWithRootViewController:oneVC]; self.navController.view.frame = CGRectMake(0.0, 64.0, 320.0, 416.0); [self.view addSubview:self.navController.view]; [self addChildViewController:self.navController]; } </code></pre> <p>The nib for this view loads the image view for the banner.</p> <p><a href="https://bitbucket.org/mr_berna/uinavigationcontroller-with-banner" rel="nofollow">The example project in on Bitbucket.</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload