2016-06-17 6 views
0

가로로 내 모습을 뒤집을 필요가 있습니다. 내가 UIView 애니메이션

어떻게이를 방지하기 위해 내 배경 화면이 검정색으로 변했을 때

나는 네비게이션 컨트롤러와 함께 플립을 시도? 나는이 코드를 시도

..

HomeViewController *homeVC = [[HomeViewController alloc] init]; 
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:homeVC]; 
nav.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
nav.modalPresentationStyle = UIModalPresentationFormSheet; 
[[self navigationController] presentViewController:nav animated:YES completion:^{ 
    [Constants showHomeScreenOnViewController:self]; 
}]; 

답변

0

아래의 코드를 시도하십시오 : -

UIViewController *controller = [[[MyViewController alloc] init] autorelease]; 
UIViewAnimationTransition trans = UIViewAnimationTransitionCurlUp; 
[UIView beginAnimations: nil context: nil]; 
[UIView setAnimationTransition: trans forView: [self window] cache: YES]; 
[navController presentModalViewController: controller animated: NO]; 
[UIView commitAnimations]; 
+0

트랜스 변수의 값을 변경하여 애니메이션 유형을 변경할 수 있습니다 –

0

당신은 코드 아래로 프레젠테이션 스타일을 변경하여 그 검은 화면을 피할 수를

이것을 사용하십시오,

nav.modalPresentationStyle = UIModalPresentationOverFullScreen; 

OR

nav.modalPresentationStyle = UIModalPresentationOverCurrentContext; 

희망이 도움이 될 것입니다.