UISplitViewController is not rotating correctly?

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

Up vote 0 down vote favorite share g+ share fb share tw.

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: 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:makeStoryTableViewControllerautorelease; 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? ).

Ios cocoa-touch ipad uitableview uisplitviewcontroller link|improve this question edited Mar 9 at 2:59 asked Mar 8 at 2:16glenstorey704519 97% accept rate.

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.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions