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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:14:04+00:00 2026-05-15T06:14:04+00:00

I have the starter point of my application this window (white background): – (BOOL)application:(UIApplication

  • 0

I have the starter point of my application this window (white background):

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    mainScreen = [[MainScreenController alloc] initWithNibName:@"MainScreenController" bundle:[NSBundle mainBundle]];

    // add it to the main window
    [window  addSubview:[mainScreen view]];

    // show view
    [window makeKeyAndVisible];

    NSLog(@"started");

    return YES;
}

And MainScreenController is an UIViewController with (blackBackground) created by the Interface Builder.

The application executes perfectly but the first time, the black view is moved up like the height of the status iphone pannel (leaving white rectangle at the bottom).

If I rotate the iPhone twice, the view is perfectly positioned in the right place, filling all the screen with the black background.

Any idea?

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-15T06:14:04+00:00Added an answer on May 15, 2026 at 6:14 am

    Check your MainScreenController settings in IB. You should select a simulated status bar element (cmd-1) so that the view is positioned below the status bar initially.

    EDIT – Why are you calling the initWithNibName in your delegate here? Most of the app templates I’ve used had the main view nib initialized by the OS and you use IB and set an IBOutlet in the main VC interface. You probably have an initial frame origin of {0,0} after calling initWithNibName. Add these lines after your initWithNibName call to verify this:

    NSLog(@"mainscreen frame=%@", NSStringFromCGRect(mainscreen.view.frame));
    
    CGRect frame = mainscreen.view.frame;
    frame.origin.y = 20;  // move below status bar
    mainscreen.view.frame = frame;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application deployed on tomcat. In this application are ExecutorService to
I have a problem where my application aggressively consumes memory to a thrashing point
We have started to use spring aop for cross cutting aspects of our application
I have started coding an FTP client application (for fun). I’m trying to represent
I have started design of a ColdFusion application that is entirely web based. Not
we're having this big problem with our application. It's a rather large application with
I have recently started working on a legacy application that has most of its
I have found this example on StackOverflow: var people = new List<Person> { new
I have an ASP.NET MVC 3 application, WouldBeBetter.com , currently hosted on Windows Azure.
I have created my site using ASP.NET Personal Starter Kits 3.5. I use Visual

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.