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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:12:12+00:00 2026-05-31T04:12:12+00:00

I know there is a lot of discussion on this topic on stack overflow,

  • 0

I know there is a lot of discussion on this topic on stack overflow, but none of the questions have an answer that works for me.

I have a SplitViewController that loads as the root view controller, and both of the tableviews inside the SVC have ShouldAutoRotate set to return YES.

The SVC won’t rotate with the iPad correctly, even though the clock / status bar do.



Update

In my AppDelegate, I’ve noticed that the rootViewController isn’t actually set until after I set it – shouldn’t the rootViewController always be set?
This code:

    MyAppAppDelegate *appDelegate = (MyAppAppDelegate *)[[UIApplication sharedApplication] delegate];
    NSLog(@"RootViewController pre set: %@", appDelegate.window.rootViewController);
    [appDelegate.window setRootViewController:splitViewController];
    NSLog(@"RootViewController post set: %@", appDelegate.window.rootViewController);

Logs as:

RootViewController pre set: (null)
RootViewController post set: <UISplitViewController: 0x88ad2d0>

Does this mean that I am mistaken in thinking the SVC is the root view controller?

Also, in IB – the window has nothing hooked up to the rootViewController outlet – is this a problem?


Here’s where the SVC is programmatically made:

-(IBAction)makeStory:(id)sender{
 MakeSentenceTableViewController *detailViewController = [[MakeSentenceTableViewController alloc] initWithNibName:@"MakeSentenceTableViewController" bundle:nil];

    UISplitViewController *splitViewController = [[[UISplitViewController alloc] init] autorelease];

    UINavigationController *rootNav = [[[UINavigationController alloc] initWithRootViewController:makeStoryTableViewController]autorelease];

    UINavigationController *detailNav = [[[UINavigationController alloc] initWithRootViewController:detailViewController] autorelease];

    splitViewController.viewControllers = [NSArray arrayWithObjects:rootNav, detailNav, nil];
    splitViewController.delegate        = makeStoryTableViewController;

    MyAppAppDelegate *appDelegate = (MyAppAppDelegate *)[[UIApplication sharedApplication] delegate];
    [appDelegate.window setRootViewController:splitViewController];
}

Here is the ShouldAutoRotate section in both tableviews (they’re identical in both):

// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {  
    NSLog(@"story idiom for rotate is iPad");
    return YES;
}

Please help me fix this so that the SplitViewController loads correctly – or help me out with some techniques to debug (e.g. how could I check for sure that the SVC is in the rootViewController, are there other methods to debugging rotation hassles?).

  • 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-31T04:12:14+00:00Added an answer on May 31, 2026 at 4:12 am

    Ah. So often part of the process in asking a question leads you to answer it to yourself.

    I had to hook up the rootViewController outlet in IB for MainWindow~ipad.xib to the viewController in the AppDelegate, then everything started working.

    So I hadn’t correctly set the UISplitViewController as the rootViewController.

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

Sidebar

Related Questions

I know there's a lot of questions about this topic but I have not
I know there a lot of similar questions to this, but I didn't find
I know there's a lot of resource for this via google, but I just
I know this has been discussed a lot of times but is there any
There have been a lot of discussion around this and everyone tend to agree
I know there is a lot of threads on this subject and I have
I know there are a lot of JavaScript escaping questions, but nothing seemed to
I know there's a lot of these sorts of questions but I'm not sure
I know there is a lot of resources about that here but yet, I
I know there are a lot of positive things mod-rewrite accomplishes. But are there

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.