How do I rotate custom splash screen on iOS?

autorotate, ios, ipad, iphone, uiinterfaceorientation

Solution

@zoul - loving this solution so far. however, if/when that view has any subviews - they don't show up. any ideas?

update:

fixed this issue by adding a subview to the UIView created in `-startupImageWithOrientation:` not self.view.

- (UIView *)startupImageWithOrientation:(UIInterfaceOrientation)io{
    UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"Default-%@.png", UIInterfaceOrientationName(io)]];
    UIView *aView = [[UIImageView alloc] initWithImage:img];
    [aView setFrame:[[UIScreen mainScreen] applicationFrame]];

    // define the version number label
    self.versionNumberLabel_iPadSplashScreen.text = [NSString stringWithFormat:@"Version %@", 
                                                                           [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]]; 

    [aView addSubview:self.versionNumberLabel_iPadSplashScreen];

    return [aView autorelease];
}

Problem

My splash screen is working, but my app works on landscape mode, and the splash screen shows in the default portrait mode. How can I start the app so that the splash screen rotates between landscape modes like my app? I'm using the following code: ``` - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Overriden to allow any orientation. if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) return YES; else { return NO; } } ``` and for the splash screen ``` -(void)displayScreen { UIViewController *displayViewController=[[UIViewController alloc] init]; displayViewController.view = displaySplashScreen; [self presentModalViewController:displayViewController animated:NO]; [self performSelector:@selector(removeScreen) withObject:nil afterDelay:3.0]; } -(void)removeScreen { [[self modalViewController] dismissModalViewControllerAnimated:YES]; } ``` But how can I put the rotate inside the display screen?

Original source