启动屏幕不会改变iPad的方向?
我在iPad应用程序中工作。我有4个启动屏幕的图像(横向右侧,左侧和纵向,纵向向上向下)。当我以纵向模式启动应用程序时,启动屏幕显示良好,但如果我将方向更改为Landscaper,启动屏幕不会更改其方向。你能给我提些建议吗?今天我需要提交应用程序。请帮帮我。提前谢谢。这是我的密码启动屏幕不会改变iPad的方向?,ipad,splash-screen,orientation-changes,Ipad,Splash Screen,Orientation Changes,我在iPad应用程序中工作。我有4个启动屏幕的图像(横向右侧,左侧和纵向,纵向向上向下)。当我以纵向模式启动应用程序时,启动屏幕显示良好,但如果我将方向更改为Landscaper,启动屏幕不会更改其方向。你能给我提些建议吗?今天我需要提交应用程序。请帮帮我。提前谢谢。这是我的密码 -(void) showSplash { UIInterfaceOrientation orientation= [[UIApplication sharedApplication] statusBarOri
-(void) showSplash
{
UIInterfaceOrientation orientation= [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIInterfaceOrientationLandscapeLeft ||
orientation == UIInterfaceOrientationLandscapeRight) // UIDeviceOrientationLandscapeLeft
{
NSLog(@"Splash Landscape");
UIViewController *splash=[[UIViewController alloc] init];
splachview=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
splachview.image=[UIImage imageNamed:@"Default-Landscape.png"];
[splash.view addSubview:splachview];
splachview.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
splachview.contentMode = UIViewContentModeTop;
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
[self presentModalViewController:splash animated:NO];
[self performSelector:@selector(hideSplash) withObject:nil afterDelay:10.0];
[splash release];
[splachview release];
}
else if (orientation == UIInterfaceOrientationPortrait ||
orientation == UIInterfaceOrientationPortraitUpsideDown) // UIDeviceOrientationPortrait
{
NSLog(@"Splash Portrait");
UIViewController *splash=[[UIViewController alloc] init];
splachview=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)];
splachview.image=[UIImage imageNamed:@"Default-Portrait.png"];
[splash.view addSubview:splachview];
splachview.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
splachview.contentMode = UIViewContentModeTop;
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
[self presentModalViewController:splash animated:NO];
[self performSelector:@selector(hideSplash) withObject:nil afterDelay:10.0];
[splash release];
[splachview release];
}
}
请纠正我的错误。启动屏幕不会改变其方向。谢谢。将您的启动文件命名为 iPad的
Default-Landscape.png
和Default-Landscape.png
Default.png'和
Default@2x.png`对于iPhone
请记住文件名区分大小写,所以请仔细检查它们谢谢Saurabh先生。我已经将它们命名为启动屏幕Default-LandscapeLeft.png、Default-LandscapeLeft.png、Default-rapital.png、Default-rapitalupsidedown.png。这是否正确,或者我是否需要更改您提到的上述名称。请帮帮我。今天我需要提交应用程序。谢谢。再澄清一次。我有两张左右的风景图片。我需要换个名字。请帮帮我,谢谢。我更改了名称,但当我旋转(更改方向)ipad时,启动屏幕不支持方向。你能帮帮我吗。我将发布我的代码。请纠正我的错误。谢谢