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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:31:11+00:00 2026-05-24T11:31:11+00:00

I created a very basic iPad application using the Window-based Application template. Unfortunately, the

  • 0

I created a very basic iPad application using the “Window-based Application” template. Unfortunately, the provided view will not rotate when I rotate the simulator.

Furthermore, when I add a view controller and/or a UINavigationController to the base window, they won’t rotate either. I’ve implemented

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

in the view controller I added … but still, can’t see any rotation.

Am I missing something?

  • 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-24T11:31:13+00:00Added an answer on May 24, 2026 at 11:31 am

    To orchestrate autorotation, your application’s window looks for its top-most subview that’s managed by a view controller. The window calls shouldAutorotateToInterfaceOrientation: on this view controller, and transforms the view controller’s view as directed.

    This is why a window based application doesn’t autorotate out-of-the-box. The default template doesn’t come with a view controller already set up for you. To take advantage of autorotation, you must create a custom UIViewController subclass, edit its shouldAutorotateToInterfaceOrientation: method as appropriate, and add that view controller’s view as a direct subview of your window (or add the view controller to a container like a UINavigationController, and add that container view controller’s view as a subview of the window). This is typically done in application:didFinishLaunchingWithOptions:.

    You state that “when I add a view controller and/or a UINavigationController to the base window, they won’t rotate either,” and that you’ve implemented shouldAutorotateToInterfaceOrientation:, and that it still won’t rotate. This should work if you’ve configured everything properly. You probably made some small mistake in this process, but I can’t say for sure what it is without seeing your project. Here are some things to check:

    1. If you’ve defined your custom view controller in a NIB, make sure you remembered to change its Class name on the Identity Inspector in IB.

    2. Make sure you’re adding the view controller’s view directly to the window, and that you don’t have some other view acting as a wrapper between your window and your view controller’s view.

    3. Make sure you’re not trying to add any subviews to your Window object in IB. You should be adding its subview in application:didFinishLaunchingWithOptions:.

    4. If you’ve defined your custom view controller in a NIB, make sure its view appears nested under the View Controller in IB. i.e. Don’t try to connect some other view to the view controller’s view outlet.

    Those are some shots in the dark. Hopefully something in this answer will help you find your mistake. If not, try creating a view-based application and compare its default configuration to your window-based application. Maybe then your mistake will jump out at you.

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

Sidebar

Related Questions

I've started a very basic Eclipse (Helios) RCP application with the Hello RCP template.
I have a very basic view controller class, created via interface builder. it only
I want to create a very basic 3D modeling tool. The application is supposed
I'm trying to create a very basic Setup and Deployment project using Visual Studio.
I've created a very simple Enterprise Application project with about 7 entity beans and
I am using SQL Server 2008 Enterprise. I have created a very simple test
I've got a very basic database schema and have created a dbml from it.
I am a very basic user and do not know much about commands used
I've created a very basic slider with jQuery. There are two arrows called .theleft
I have created a very basic service operation that needs to write content to

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.