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

  • Home
  • SEARCH
  • 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 8045213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:28:37+00:00 2026-06-05T05:28:37+00:00

I have a single view application (created from the iOS Template, nothing special) There

  • 0

I have a single view application (created from the iOS Template, nothing special)

There is 1 button:

- (IBAction)buttonWasTapped:(id)sender {
    // Toggle status bar hidden property
    BOOL hidden = [[UIApplication sharedApplication] isStatusBarHidden];
    [[UIApplication sharedApplication] setStatusBarHidden:!hidden withAnimation:UIStatusBarAnimationFade];
}

I first load the app.

enter image description here

Then hit the button.

enter image description here

This is fine. I can work around the black space at the top. Next tap the button again and rotate to landscape. Then tap the button once more. It should look like this.

enter image description here

Finally rotate back to porttrait and tap the button.

enter image description here

In summay the issue is:

  1. Hide the status bar
  2. Swap the orentation (either to portrait or landscape)
  3. Show the status bar
  4. The status now bar covers the UI

I made a really hacky workaround, but I don’t like it and Im sure it will break if Apple sort it out.

  • Has anyone seen this before?
  • Is there a better solution?
  • 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-06-05T05:28:39+00:00Added an answer on June 5, 2026 at 5:28 am

    I faced simmilar problems, my fix was on will rotate to orientation i would reshow the bar,
    and hide it on did rotate to orientation (or hide it again using performselector with delay)
    What is happening to you is that when the device rotates, the view takes all the available space, it will also fill the space that used to contain the status bar

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        // A workaround to stop the rotation filling up the status bar space
        // Show the status bar and then hide it straight after, (there is no flicker)
        if ([[UIApplication sharedApplication] isStatusBarHidden]) 
        {
            [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
    
            double delayInSeconds = 0.0;
            dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
            dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
                [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
            });
        }
    
        if (!_controlsHidden) [self resetFadeoutTimer];
    
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that I created by using Xcode's Single View Application template.
I have a single view in my application which does not receive any events
I created an empty Single View application using Xcode 4.2 on OSX Lion 10.7.2
I have picker controls on a single view with two outlets for each. When
I have a single annotation on a map view. I can select it programmaticly,
I need to have various text view on a single line. And I want
I have created a very basic Hello world application where I am trying to
I have a single application which manages and delivers several sites. I does this
In my application, I have URN-identified data coming in from the server. I'm in
I have created a server/client application. Both of them are written in C#. It

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.