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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:56:35+00:00 2026-05-17T00:56:35+00:00

I am working on an iPad app (which will not be submitted to the

  • 0

I am working on an iPad app (which will not be submitted to the App Store) which supports only landscape mode.

Most of the views in the application are pushed onto a UINavigationController with a hidden navigation bar.

When I add the following code in the top view controller in the aforementioned UINavigationController, the new UINavigationController (navController) is created in portrait mode and appears sideways and off-screen.

MyViewController *myViewController = [[MyViewController alloc] initWithNibName:@"MyView" bundle:nil];
// viewController.view is landscape in MyView.xib

// myViewController is created in landscape mode
NSLog(@"%@", NSStringFromCGRect(myViewController.view.frame)); // {{0, 0}, {1024, 704}}

UINavigationController *navController = [[UINavigationController alloc]
    initWithRootViewController:myViewController];

// navController is created in portrait mode (why?)
NSLog(@"%@", NSStringFromCGRect(navController.view.frame)); // {{0, 0}, {768, 1024}}

[self presentModalViewController:navController animated:YES];

// navController is shifted off-screen after it is presented modally (why?)
NSLog(@"%@", NSStringFromCGRect(navController.view.frame)); // {{1024, 0}, {748, 1024}}

I cannot find any possible reason for this to occur, nor can I figure out how to reorient the view to landscape mode; I can change its frame but its content is still sideways.

I tried adding the following to MyViewController.m to no avail:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return !UIInterfaceOrientationIsPortrait(interfaceOrientation);
}

I even tried adding this code to a UINavigationController subclass which did not work either.

  • 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-17T00:56:36+00:00Added an answer on May 17, 2026 at 12:56 am

    I was able to get the view navigation controller to orient itself correctly by adding it as a subview of my application’s root view.

    MyRootViewController *myRootViewController = [[[UIApplication sharedApplication] delegate] myRootViewController];
    [myRootViewController presentModalViewController:navController animated:YES];

    This code is in the top view controller of the navigation controller which is a subview of the root view.

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

Sidebar

Related Questions

i developing an iPad app in which i working with images.The application is worked
I am working on an iPad app which has an embedded HTTP server listening
I'm working on an iPad app, it has a few videos within views using
I have an iPad app in which I'm setting the shadow color of a
I'm working on a UINavigationController driven iPad app (testing in the simulator). There are
I'm working on an ipad application that needs to work with images; it uses
I have done what this question said here: Landscape Mode ONLY for iPhone or
My application handles with files of type *.mndl which is not more than a
I am working on an iPad app that is fed data via web service
I'm working on an iPhone-iPad app with Objective-C. I need to get the Bonjour

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.