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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:15:19+00:00 2026-06-12T15:15:19+00:00

I just opened my iPad project on XCode 4.5. My app is designed to

  • 0

I just opened my iPad project on XCode 4.5. My app is designed to run in Landscape mode. It works perfectly on previous versions of XCode. But on XCode 4.5, it is rotated of 90° (quarter turn) with a empty area on the right side of the screen (and my view has the correct size but goes out of the screen). It looks like this:

The view (red) rotated of 90° and going of the screen in landscape mode

I checked the following posts but didn’t help:

orientation issue in ios6

ios6 Rotation issue from landscape to portrait mode

Set orientation to landscape mode in xcode 4.5 GM IOS 6

Anybody had this issue ?

Any help would be appreciated !

  • 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-12T15:15:20+00:00Added an answer on June 12, 2026 at 3:15 pm

    Thanks everybody for your replies. I finally found a solution.

    First, check that all your launch images have the correct orientation and correct size in the target summary menu (blue icon of your project => target => summary => scroll at the bottom) ; if the size or orientation is not correct, you get a warning on the launch image which is not set properly.

    Up to now, I had a project with this structure (old XCode fashion):

    • AppDelegate.h and .m
    • RootViewController.h and .m
    • a MainWindow-Iphone.xib and MainWindow-iPad.xib (with the RootViewController linked in Interface Builder ; see the screenshot below with the yellow/brown icon (with a square inside) relative to the RootViewController)

    Here below a screenshot of what it looked like:

    My old project structure

    And here is what was the code in the applicationDidFinishLaunching: method of my AppDelegate:

    - (void)applicationDidFinishLaunching:(UIApplication *)application {  
    
         [window addSubview:[rootViewController view]];
         [window makeKeyAndVisible];
    
    }
    

    What I did is to be closer to the structure you get when you create an empty project with XCode 4.5. Consequently:

    1. I removed the MainWindow.xib and MainWindow-iPad.xib and now created my window programatically (clearer and better to make sure that it fits the size of any screen)
    2. I removed the “Main nib file base name” and “Main nib file base name (iPad)” keys which were defined in my Info.plist (and set to MainWindow.xib and MainWindow-iPad.xib)
    3. I added empty RootViewController_iPhone.xib and RootViewController_iPad.xib
    4. I changed the code in my applicationDidFinishLaunching method like this:

      - (void)applicationDidFinishLaunching:(UIApplication *)application {    
      
      NSLog(@"applicationDidFinishLaunching");
      
       self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      
      if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
          self.rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController_iPhone" bundle:nil];
      } else {
          self.rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController_iPad" bundle:nil];
      }
      
      self.window.rootViewController = self.rootViewController;
      
      [self.window makeKeyAndVisible];
      

      }

    And now, everything works fine ! Orientation is correct on iPad ! And it is much more clear than before 🙂 I even didn’t have to change the deprecated methods like

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    

    By the way, to make sure that all your views will be full screen (on iPhone 5) make sure that your views are set to the mode “Scale to fill” in Interface Builder and that “Autoresize subviews” is clicked. If some of your views do not scale to full screen, it is probably due to the order in which one you create your controllers/views (the superView sends a notification to its subviews only when it (the superView) is created). To solve this easily, simply add the following code in the - (void)viewDidLoad method:

    CGRect screenBounds = [[UIScreen mainScreen] bounds];
        [self.view setFrame:CGRectMake(0,0,screenBounds.size.width,screenBounds.size.height)];
    

    or use:

    [self presentModalViewController:myViewController animated:TRUE];
    

    instead of:

    [self.view.superview addSubview:myViewController.view];
    

    presentModalViewController indeed sends a resizing notification to the subviews.

    Hope this will help !

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

Sidebar

Related Questions

I just opened my project in the new XCode 4.2 for the first time
Today I just opened the project I was working on XCODE 4, and only
I just opened an older android app project and all of a sudden numerous
I just opened my project with Xcode 4.1GM (was using 4.0.2 before). When I
today I just opened my 1,5 month old project and wanted to add a
I just opened up a project I have done in MVC a while back,
I just opened someone else's Visual Studio project and in their build properties they
I just opened up a project that had the .hgignore file set up entirely
I just opened a project i havent worked for in a couple months, and
I've recently downloaded Eclipse C++ for Mac. I've just opened up a basic project

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.