带有推送视图控制器动画的 popViewController



我想用pushViewController动画弹出视图控制器。有什么办法可以做到这一点吗?可能吗?

你可以:)的技巧

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

流行 2x 无动画

推送

目标视图控制器动画,并且您有控制器和推送动画:)

我希望它有所帮助!

工作 100 %

列表=[[List_ViewController alloc]initWithNibName:@"List_ViewControlleripad" bundle:nil]; CATransition *transition=[CATransition animation]; 过渡持续时间 = 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 = NO; [自我导航控制器推送视图控制器:列表动画:否];

[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];

让我知道它是否有效...快乐编码!!!

相关内容

  • 没有找到相关文章

最新更新