2011-12-22 2 views
0

iPad 앱에서 일하고 있습니다. 스플래시 화면 (풍경 오른쪽, 왼쪽 및 세로, PortraitUpsideDown)에 대해 4 개의 이미지가 있습니다. 세로 모드에서 응용 프로그램을 시작하면 스플래시 화면이 좋아 보이지만 스플래시 화면의 방향이 변경되지 않는 Landscaper의 방향이 변경됩니다. 나에게 어떤 아이디어라도 제안 해 주시겠습니까? 오늘은 앱을 제출해야합니다. 도와주세요. 미리 감사드립니다. 여기 내 코드는스플래시 화면이 iPad에서 방향을 변경하지 않습니까?

-(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]; 
    } 
} 

제발 실수를 수정하십시오. 스플래시 화면의 방향이 변경되지 않습니다. 감사. 아이폰 아이 패드
Default.png' and 기본 @ 2x.png`에 대한

Default-Landscape.pngDefault-Landscape.png

답변

1

이름 당신의 시작 파일.

파일 이름은 대소 문자를 구별하므로 다시 확인하십시오.

+0

감사합니다. Mr.Saurabh. 나는이 스크린들을 스플래쉬 스크린들로 명명했다. Default-LandscapeLeft.png, Default-LandscapeLeft.png, Default-Portrait.png, Default-PortraitUpsideDown.png. 이것이 올바른지 또는 위에 언급 된 이름을 변경해야하는지 여부 도와주세요. 오늘은 앱을 제출해야합니다. 감사. –

+0

설명이 한 번 더 있습니다. 나는 풍경 오른쪽과 왼쪽에 대한 두 개의 이미지가 있습니다. 이름을 바꿀 필요가있어. 도와주세요. –

+0

내가 언급 한대로 이름을 지어 라. – Saurabh

관련 문제