代码块的故事板viewcontrollers动画和它的工作,但不是我想要的.. iwant从左到右的动画布做它的“左下角”到右上角。为什么不从左到右?objective-c CATransition问题
第二我如何停止动画?
UIViewController *sourceViewController = (UIViewController*)[self sourceViewController];
UIViewController *destinationController = (UIViewController*)[self destinationViewController];
CATransition* transition = [CATransition animation];
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromRight;
[destinationController.view.layer addAnimation:transition forKey:kCATransition];
[sourceViewController presentViewController:destinationController animated:YES completion:nil];
'[sourceViewController presentViewController:destinationController animated:NO completion:nil];'设置'NO'为Apple默认模态动画 –