0

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

4

3 回答 3

1

有一个技巧你可以:)

获取要在弹出后可见的视图控制器。

pop 2x 没有动画

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

我希望它有帮助!

于 2012-11-22T11:51:51.037 回答
1

工作 100 %

list=[[List_ViewController alloc]initWithNibName:@"List_ViewControlleripad" bundle:nil]; CATransition *transition = [CATransition 动画]; 过渡时间= 0.45;transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; transition.type = kCATransitionFromLeft; [过渡集类型:kCATransitionMoveIn];transition.subtype = kCATransitionFromLeft; transition.delegate = self; [self.navigationController.view.layer addAnimation:transition forKey:nil]; self.navigationController.navigationBarHidden = 否;[self.navigationController pushViewController:list animated:NO];

于 2015-06-09T10:14:03.543 回答
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];

让我知道它是否工作......快乐编码!!!!

于 2012-11-22T11:56:24.373 回答