Linux 如何在 iPhone 中使用翻转动画从另一个视图转到一个视图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3677076/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 23:13:11  来源:igfitidea点击:

how to go one view from another view using with flip animation in iPhone

iphoneobjective-c

提问by kunal-iPhone Developer

I am flip animation to go from one view to another and animation is working properly but when i am using button action on that view that time application is getting crash.

我正在翻转动画以从一个视图转到另一个视图并且动画正常工作但是当我在该视图上使用按钮操作时应用程序崩溃了。

Please help me out to solve this problem.

请帮我解决这个问题。

my code is:

我的代码是:

Abtsk1 *secondViewController = [[Abtsk1 alloc] 
                        initWithNibName:@"Abtsk1" 
                        bundle:nil];

[UIView beginAnimations:@"flipping view" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown 
                       forView:[[self navigationController] view] cache:YES];

[self.view addSubview:secondViewController.view];
[UIView commitAnimations];

Thanks Kunal

谢谢库纳尔