title: Rotate interface with UITabBarController
body: <p>I've created a new "Tab Bar project" with the new Xcode 4.2.
  The "new" way to work with UITabBar is different: Xcode doesn't create a xib file (with the UITabBarController), but it does everything via code.
  Ok, let's do it.</p>
  
  <p>So my code in <code>didFinishLaunchingWithOptions</code> is this:</p>
  
  <pre><code>UIViewController *viewController1, *viewController2, *viewController3;
  UINavigationController *nav1, *nav2, *nav3;
  
  if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
  
      viewController1 = [[gemboy_iphone alloc] initWithNibName:@"vc1" bundle:nil];
      viewController2 = [[concerti_iphone alloc] initWithNibName:@"vc2" bundle:nil];
      viewController3 = [[discografia_iphone alloc] initWithNibName:@"vc3" bundle:nil];
  
      nav1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
      nav2 = [[UINavigationController alloc] initWithRootViewController:viewController2];
      nav3 = [[UINavigationController alloc] initWithRootViewController:viewController3];
  
  }
  else {
    //same thing for the iPad version
  }
  self.tabBarController = [[UITabBarController alloc] init];
  self.tabBarController.viewControllers = [NSArray arrayWithObjects:nav1, nav2, nav3, nil];
  self.window.rootViewController = self.tabBarController;
  [self.window addSubview:self.splash.view];
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>And it works.</p>
  
  <p>My three .m files vc1.m, vc2.m and vc3.m (and also my iPad UIViewControllers) has this method</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
       return YES;
  }
  </code></pre>
  
  <p>The problem is that when I rotate the iPhone, it rotates only the status bar, and not the TabBarController!</p>
  
  <p>Do you know why?
  Thanks</p>