3

기기를 가로 방향으로 회전 할 때 커버 플로우 스타일보기를 가로 방향으로 표시해야하는 앱을 만들고 있습니다. 이전에 몇 가지 앱을 사용해 봤지만 그 중 어느 것도 가로/세로를 필요로하지 않아서 경험이 없습니다. Coverflow 뷰를 그리는 코드가 있지만 표현하기가 어렵습니다.장치를 돌릴 때 가로 방향 커버 플로우 스타일보기를 표시하려면 어떻게합니까?

기본적으로 Coverflow를 표시 할 때 iPod 앱이하는 것과 같습니다. 아래쪽보기는 회전하지 않지만 덮개 흐름은 위쪽으로 사라지고 뒤로 회전하면 사라집니다.

나는 그것이 여기 페이드 전환, 또는 기술을 사용하여 제시되고 shouldAutorotateToInterfaceOrientation 및 모달보기 함께 할 수있는 뭔가 같은데요 : http://www.iphonedevsdk.com/forum/iphone-sdk-development/22285-replicating-cool-ipod-landscape-transition-iphone.html

는 것 같아요 내 주요 문제는 모달이다 보기가 표시되지만 내용이 가로로 회전되지 않습니다. 어떻게해야합니까?

학부모 VIEW

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ 
NSLog(@"rotating?"); 
if (interfaceOrientation == UIInterfaceOrientationPortrait) { 
    return YES; 
} 
if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { 
    NSLog(@"rotating"); 
    CoverFlowViewController *coverFlowView = [[CoverFlowViewController alloc] init]; 
    [coverFlowView setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; 
    [self presentModalViewController:coverFlowView animated:YES]; 
    [coverFlowView release]; 
} 
return YES; 

}

모달보기

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
NSLog(@"rotating? going back?"); 
if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)) { 
    return YES; 
} else { 
    [self.parentViewController dismissModalViewControllerAnimated:YES]; 
} 
return NO; 

가}

+0

나는 이것을 알고 싶습니다 ... –

답변

1

당신은을 수행해야합니다 여기

내가 지금 사용하고 코드입니다 내부 전환 :

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { 

} 
관련 문제