2012-10-18 8 views
0

내 스플래시 화면을 내 ipad에서 오른쪽과 왼쪽으로 회전 할 수 있기를 원합니다. 내 .plist 파일에서 가로 방향의 가로 및 세로 방향을 사용하도록 설정했습니다.ipad 스플래시 화면이 회전하지 않습니다

[email protected]~ipad.png 
[email protected]~ipad.png 
Default-LandscapeRight~ipad.png 
Default-LandscapeLeft~ipad.png 

이 문제가되지해야하지만, 내 rootviewcontroller에 내가있어 : 내가 4 개 파일 LandscapeRight 및 LandscapeLeft 추가 한

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
    return (UIInterfaceOrientationIsLandscape(interfaceOrientation)); 
} 

시작 화면로드하지만, '아무튼 회전. 무엇이 잘못 되었나요?

+0

맞춤 스플래시 화면을 사용할 수 있습니다. –

+0

@SarafarazBabi 자세히 알려주십시오. 나는 좌우 프리 스플래시 스크린을 정의하는 것이 스플래쉬 스크린이라고 생각했다. – Alex

+1

스플래쉬 스크린을위한 하나의 클래스를 생성하여 rootviewcontroller로 전달할 수 있으며, 1 또는 2 초 후에 홈뷰 컨트롤러를 밀어 넣고 스플래시 스크린 클래스에서 관리자 권한을 관리한다. ...알았다? –

답변

0

나는 장치가 스플래쉬 Image.These 스플래시 이미지의 지속 시간의 방향을 인식하지 못하는 노우 [email protected]~ipad.png [email protected]~ipad.png 기본-LandscapeRight ~ ipad.png 응용 프로그램이 장치를 시작할 때 인식 한 다음 장치가 적절한 시작 이미지를 인식합니다. Default-LandscapeLeft ~ ipad.png. 이 단지 더

1이이 목적을 위해있는 UIImageView을 만들고 창에 하위 뷰를 같이 추가 내 개념에 불과하다 interested.and 경우

당신은 대체 솔루션을 할 수 있습니다.

2 iamge를 해당 UIIMageView로 설정하십시오.

3 수면 방법을 3-4 초로 설정하십시오. 수면 (4).

4 RootViewController가 호출되면서 이미지의 방향을 관리합니다.

아래와 같은 방법입니다. 이것은 Defined In AppDelegate 클래스에서 Image Orientation을 관리한다고 가정합니다. 당신은 응용 프로그램 Instaltion, RoortViewController의 중간에서 그 이미지의 양식을 관리 할 수 ​​있습니다

5

-(void)checkOrientationforSplash:(UIInterfaceOrientation)interfaceOrentaion 
    { 
if (splashImageView.hidden==FALSE) { 
    if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ 
    if (interfaceOrentaion==UIInterfaceOrientationPortrait|| interfaceOrentaion==UIInterfaceOrientationPortraitUpsideDown) { 
     UIImage *image=[UIImage imageNamed:@"Default-Portrait.png"]; 
     splashImageView.frame=CGRectMake(0.0, 0.0, image.size.width, image.size.height); 
     [splashImageView setImage:image]; 

    } 
    else { 
     UIImage *image=[UIImage imageNamed:@"Default-Landscape.png"]; 
     splashImageView.frame=CGRectMake(0.0, 20.0, image.size.width, image.size.height); 
     [splashImageView setImage:image]; 
    } 
     } 

}.

6 특정 시점의 스플래시 이미지 제거.

-(void)removeSplash 
    { 
    [splashImageView setHidden:YES]; 
    } 

도움이되기를 바랍니다.

+0

이것은 좋은 아이디어입니다! 감사! btw 내 스플래시 화면이 시작해서는 안됩니다! (즉, 오른쪽 및 왼쪽으로 잡고 있으면 똑같은 것이고 올바른 스플래시는 선택하지 않습니다). – Alex

관련 문제