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 8748845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:35:43+00:00 2026-06-13T12:35:43+00:00

tl;dr: User interface layout is broken when rotating the iPad while taking a photo,

  • 0

tl;dr: User interface layout is broken when rotating the iPad while taking a photo, if the app displays a status bar.

I’ve got an app that shows a status bar that should take photos through a UIImagePickerController.

I’m running this on an iPad 3, iOS 6 with Xcode 4.51

The first problem I noticed was that if I didn’t hide the statusbar via

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

before the call to

[self presentViewController:imagePicker animated:YES completion:nil];

Then the UIImagePickerController would not be shown correctly on the screen. The space for the status bar would still be reserved (but no time or battery information etc. shown) with the result that the controls at the lower end of the screen would be partly off-screen.

So, I added the line

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

before presenting the UIImagePickerController and the first problem was solved.

Now comes the second problem (caused by the solution to the first problem). When I bring up the UIImagePickerController, rotate the iPad and close it (via “cancel” or “use”, doesn’t matter), the handler (either imagePickerControllerDidCancel or imagePickerController:didFinishPickingMediaWithInfo: gets called, in which I show the status bar again, via

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];

The problem is now that the status bar is shown in fact, but the rest of the app seems to be unaware that it is on the screen again. (The UIToolbar that I have on my “MainViewController” is partly hidden behind the status bar.) The interesting thing is, if I rotate the iPad to any other orientation all is displayed correctly again after the animation finishes.

Can anybody give me any tips on how to solve this problem? (Currently my best work around would be to leave the status bar hidden after the first time somebody took a photo, but that’s kind of sub-optimal). Maybe there is a better solution to the first problem, or maybe a method to solve both issues.

Further information: After rotating the iPad to landscape while UIImagePickerController was active, this is the frame of my MainViewController’s view frame: {{0, 0}, {1024, 768}} (i.e. in the case where there is the problem). When I have the iPad in landscape orientation all the time, this is the MainViewController’s view frame after the UIImagePickerController is dismissed: {{0, 0}, {1024, 748}} (This is the case where there is no problem.)

Thanks in advance for your attention and effort!

  • 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-13T12:35:44+00:00Added an answer on June 13, 2026 at 12:35 pm

    I just came across the same issue on iPhone when displaying an image picker that takes an image from the camera. The solution I found was to make a call to show the statusbar when the view that popped up the image picker will re-appear. Eg.

    - (void)viewWillAppear:(BOOL)animated
    {
        [super viewWillAppear:animated];
    
        [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are creating a user interface that functions on a wide variety of platforms
When writing Cocoa apps, I do the majority of the user interface layout programmatically.
I user Interface Builder to layout my view and image view. I put a
My app's main interface is a viewpager where the user just slides the pages
I am trying to achieve this user interface through the layout. But getting issues
User interface for web applications in general contain various buttons for performing CRUD operations.
I'm creating a User Interface using PyQt4 module . the problem i'am facing is
I am designing the user interface of a web application but I am inexperienced
The Yahoo User Interface library offers rollup support if you use their CDN. I'm
I'm designing the user interface. It has some static content and a lot of

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.