2014-02-20 3 views
0

사용자가 현재있는보기 컨트롤러가 아래로 슬라이드하고 화면의 새보기 컨트롤러가 아래쪽으로 표시되는보기 컨트롤러 애니메이션을 만들려고합니다. 그래서 새로운 뷰 컨트롤러는 배경처럼 움직이게 될 것이고, 새로운 뷰 컨트롤러는 아래로 슬라이딩하여 드러내는 것입니다. 나는 그 장면을 주었지만 성공하지는 못했다. 이 일을 어떻게 권장 하시겠습니까? 여기 사용자 정의보기 컨트롤러 애니메이션 만들기

내가 시도 것입니다 :

-(void)showLogout:(UIButton *)sender { 

    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"TermsAccepted"]; 

    WelcomeViewController *welcomeViewController = [[WelcomeViewController alloc] init]; 

    [UIView beginAnimations:nil context:NULL]; 
    [UIView setAnimationDuration:1]; 
    self.view.frame = CGRectMake(0, 1200, 320, 568); 
    [self.navigationController pushViewController:welcomeViewController animated:NO]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.view cache:YES]; 
    [UIView commitAnimations]; 

} 

답변

0

-(void)showLogout:(UIButton *)sender { 

    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"TermsAccepted"]; 

    WelcomeViewController *welcomeViewController = [[WelcomeViewController alloc] init]; 

    [UIView beginAnimations:nil context:NULL]; 
    [UIView setAnimationDuration:1]; 
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController cache:YES]; 

    self.view.frame = CGRectMake(0, 1200, 320, 568); 
    [self.navigationController pushViewController:welcomeViewController animated:NO]; 
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.view cache:YES]; 
    [UIView commitAnimations]; 
시도
관련 문제