Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone解除了ModalViewController动画_Iphone_Presentmodalviewcontroller_Dismiss - Fatal编程技术网

Iphone解除了ModalViewController动画

Iphone解除了ModalViewController动画,iphone,presentmodalviewcontroller,dismiss,Iphone,Presentmodalviewcontroller,Dismiss,我如何修改动画以消除 目前,我使用了: SlideShow *slider = [[SlideShow alloc] initWithNibName:@"SlideShow" bundle:nil]; slider.view.alpha = 0.0; [self presentModalViewController: slider animated: NO]; [UIView beginAnimations: nil context: nil]; [UIView setAnimationDur

我如何修改动画以消除

目前,我使用了:

SlideShow *slider = [[SlideShow alloc] initWithNibName:@"SlideShow" bundle:nil];
slider.view.alpha = 0.0;
[self presentModalViewController: slider animated: NO];

[UIView beginAnimations: nil context: nil];
[UIView setAnimationDuration:1.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];

slider.view.alpha = 1.0;
[UIView commitAnimations];
而且很有效

但是,如何使用自定义动画消除它(我正在寻找用于消除的淡出动画)


谢谢。

您正在以传统的方式淡出视图控制器,因为iOS 3淡出视图控制器的最简单和最好的方法是设置其属性:(例如,在init方法中)


然后,视图控制器将很好地淡入淡出。

presentModalViewController
本质上是一种为视图控制器提供预烘焙动画的方法。如果你想制作一个自定义的动画来取消或呈现一个模态视图,你必须自己处理。

谢谢,这是我在发布问题后立即使用的,但这仍然不能回答我的问题。如何执行自定义动画?!(我想知道这方面的一般解决方案)
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;