Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7218057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:25:58+00:00 2026-05-28T21:25:58+00:00

I have a problem which is caused by the status bar being hidden and

  • 0

I have a problem which is caused by the status bar being hidden and then made to reappear – doing so changes the position of the navigation bar from being displayed below the status bar to being displayed behind it. i.e. the top part of the navigation bar can no longer be seen any more because the status bar is on top of it.

My program is constructed such that I have a root view controller that displays the status bar and the navigation bar, the view controller is contained within a navigation controller i.e.

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.myTableViewController];
self.window.rootViewController = navController;

The view controller contains a table view and if the user selects a row then another controller is created and pushed to the navigation controller’s stack.

This new view controller hides the status bar and also hides the navigation bar unless the user taps the screen, in which case the navigation bar appears (and its also translucent, which it is not in the parent view controller).

My problem is that when the user navigates from this view controller back to the table view controller then the navigation bar is now displayed behind the status bar.

I have the following code in the table view’s viewWillAppear: which I thought ought to reset everything back to the way it was.

- (void)viewWillAppear:(BOOL)animated
{    
    [[UIApplication sharedApplication] setStatusBarHidden: NO withAnimation: UIStatusBarAnimationFade];
    self.navigationController.navigationBar.translucent = NO;
    [self.navigationController setNavigationBarHidden:NO animated:YES];

Why does the navigation bar appear behind the status bar when the table view re-appears?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T21:25:59+00:00Added an answer on May 28, 2026 at 9:25 pm

    I believe the status bar is about 20px high, so set the navigationBar’s origin.y to be 20 and it should fix it. I know it’s annoying, but that seems to be the only way to fix it in my experience.

    Also check the position of the navigationBar when your app is coming out of a background state, I know my navigationBar reverted right back to being under the status bar when it came to the foreground.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem which requires me to parse several log files from a
I have a problem which I think is related to forward declarations, but perhaps
I have a problem which requires a reversable 1:1 mapping of keys to values.
I have a problem which I cant seem to find answer to through searches
I have a problem which I don't know how to fix. It has to
I'm developing an Eclipse plug-in and I have a problem which is reproduced here:
I have a strange problem which I can't fix: A field: private boolean[][][] gaps;
I have a very simple problem which requires a very quick and simple solution
It looks like a problem which could have simple solution, but I haven't found
I have a number of devices from which i need to get status updates.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.