popViewController与pushViewController动画

时间:2012-11-22 11:47:34

标签: iphone ios pushviewcontroller popviewcontroller

我想使用pushViewController动画popViewController。有没有办法做到这一点?有可能吗?

3 个答案:

答案 0 :(得分:1)

诀窍你可以:)

获取想要在pop后显示的viewcontroller。

弹出2x没有动画

将targetviewcontroller推送到动画,你有控制器和推送动画:)

我希望它有所帮助!

答案 1 :(得分:1)

100%工作

  

列表= [[List_ViewController   ALLOC] initWithNibName:@" List_ViewControlleripad"捆绑:无];       CATransition * transition = [CATransition animation];       transition.duration = 0.45;       transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];       transition.type = kCATransitionFromLeft;       [transition setType:kCATransitionMoveIn];       transition.subtype = kCATransitionFromLeft;       transition.delegate = self;       [self.navigationController.view.layer addAnimation:transition forKey:nil];       self.navigationController.navigationBarHidden = NO;       [self.navigationController pushViewController:list animated:NO];

答案 2 :(得分:0)

[UIView beginAnimations:nil context:nil];
 TargetViewCointroller *obj = [[TargetViewCointroller alloc]initWithNibName:@"TargetViewCointroller" bundle:nil];
  [self.navigationController pushViewController:obj animated:YES];

   [UIView setAnimationDuration:1.0];
    [UIView setAnimationBeginsFromCurrentState:YES];
     [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
     [obj_ release];

告诉我工作与否...... 快乐的编码!!!!