Ios presentViewController的动画属性
我正在使用Ios presentViewController的动画属性,ios,objective-c,uiviewanimation,Ios,Objective C,Uiviewanimation,我正在使用UINavigationControllerDelegate实现一个uiviewcontrolleranimated转换,以创建一个自定义推送动画。我希望推送看起来完全像presentViewController使用的向上滑动动画 我目前使用的是0.4秒的持续时间和UIViewAnimationOptionCurveEaseOut,它看起来非常接近标准的presentViewController动画,但我不想只相信我的眼睛 有没有人知道什么是presentViewController的
UINavigationControllerDelegate
实现一个uiviewcontrolleranimated转换,以创建一个自定义推送动画。我希望推送看起来完全像presentViewController
使用的向上滑动动画
我目前使用的是0.4秒的持续时间和UIViewAnimationOptionCurveEaseOut
,它看起来非常接近标准的presentViewController
动画,但我不想只相信我的眼睛
有没有人知道什么是presentViewController
的动画属性,这样我就可以确保完全模仿它们了
我之所以要做一个自定义推送动画,而不仅仅是使用一个模态视图控制器,是有原因的。我不想让它分散我提出的问题的注意力。
提前谢谢 使用这行代码
UIViewController *yourViewController = [[UIViewController alloc]init];
[UIView beginAnimations: @"Showinfo" context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController: yourViewController animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
我使用动画持续时间0.75看起来像modally view演示。
检查这个