2012-01-22 2 views
0

UINavigationController 및 완료 버튼과 함께 모달로 표시되는 UIViewController을 어떻게 수직으로 대칭 이동할 수 있습니까?모달로 표시되는 수직으로 뒤집는 방법 UIViewController

나는 UIViewController 모달 제시하고 방법이 있습니다 :

- (void)modalViewAction:(id)sender 
{ 
    self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds] autorelease]; 
    [self.view setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; 
    _viewController = [[ModalViewController alloc] init]; 
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:_viewController]; 
    UIBarButtonItem * button = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissView:)] autorelease]; 
    [_viewController.navigationItem setLeftBarButtonItem:button animated:YES]; 
    navigationController.navigationBar.tintColor = [UIColor brownColor]; 
    [self.navigationController presentModalViewController:self.viewController animated:YES]; 
    [self.view addSubview:navigationController.view]; 
    [navigationController release]; 
} 

은 어떻게 모달을 제시하면서이 UIViewController을 전환 할 수 있습니까?

도움 주셔서 감사합니다.

답변

1

(보기 컨트롤러를 표시하기 전에) modalTransitionStyle 속성을 설정하여 원하는 애니메이션 기법을 지정할 수 있습니다. 이 지원되지 않습니다

UIModalTransitionStyleCoverVertical 
UIModalTransitionStyleFlipHorizontal 
UIModalTransitionStyleCrossDissolve 
UIModalTransitionStylePartialCurl 

그래서 수직 플립 :

는 불행하게도이 속성은 설정할 수 있습니다. http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html

:

것은 UIModalTransitionStyle 참조를 살펴 보자

관련 문제