最近在研究一个项目,利用手势控制动画的进度,发现简单的还可以,如果遇到了复杂的情况就比较麻烦了,ios7新出了一个特性,可以利用NavigationController的自定义转场动画,提供进度来控制。

//这个方法控制转场动画的进度-(id<UIViewControllerInteractiveTransitioning>)navigationController:(UINavigationController*)navigationControllerinteractionControllerForAnimationController:(id<UIViewControllerAnimatedTransitioning>)animationController//在这里实现转场动画-(id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController*)navigationControlleranimationControllerForOperation:(UINavigationControllerOperation)operationfromViewController:(UIViewController*)fromVCtoViewController:(UIViewController*)toVC

一个demo的地址:https://github.com/nishimao/MAOFlipViewController