使用 UIViewAnimationOptionTransitionCurlDown 自定义 Segue
我想创建一个自定义 Segue 来用卷曲动画交换 ViewController,但我找不到方法,-(void) 执行此操作会是什么?
我已经明白了
-(void)perform{
UIViewController *dst = [self destinationViewController];
UIViewController *src = [self sourceViewController];
[UIView beginAnimations:nil context:nil];
//change to set the time
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:src.view cache:YES];
[UIView commitAnimations];
}
,但我无法改变观点,无论如何,感谢您的帮助!
I'd like create a custom segue to swap ViewControllers with a curl up animation but I can't find a way, What would be the -(void)perform for this?
I've got this
-(void)perform{
UIViewController *dst = [self destinationViewController];
UIViewController *src = [self sourceViewController];
[UIView beginAnimations:nil context:nil];
//change to set the time
[UIView setAnimationDuration:1];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:src.view cache:YES];
[UIView commitAnimations];
}
But I don't get to change the view, anyway thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系,我解决了这个问题,根据记录,我唯一要做的就是添加一个导航控制器,然后我可以使用自定义转场,例如:
Nevermind, I solved it, for the record the only thing I had to do was add a Navigation Controller and then I could use custom segues like: