淡出动画(UIViewAnimation) [英] Fade Animation (UIViewAnimation)

查看:200
本文介绍了淡出动画(UIViewAnimation)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这一点上,我用简单的视图切换工作,现在我与动画制作工作,而切换以x code意见。然而,我的知识是没有的话题广泛,我花了大约一个小时研究发布之前这个问题,所以我都试过了,

At this point, I am working with simple view switching, and now I'm working with animation while switching views in xcode. However, my knowledge is not extensive on the topic, and I have spent about an hour researching this question before posting, so I have tried,

所有我想要做的就是简单地淡出到下一个视图。我不知道是否有它的动画,但是我做的是让app黑渐变在某一方向练习。但是,如果有更好的动画,你可以建议,请这样做。谢谢!

All I want to do is simply fade to the next view. I don't know if there is an animation for it, but what I am doing is making the app fade to black on a certain orientation for practice. However, if there is a better animation that you could suggest, please do so. Thanks!

-Jake

推荐答案

如果这是你的问题的症结所在所有我想做的只是淡出到下一个视图。那么这是与形式上的过渡风格很容易办到。假设你有一个名为候补一个的UIViewController 子类要转换此示例。

If this is the crux of your question "All I want to do is simply fade to the next view." Then this is achieved very easily with the modal transition style. Assume for this example you have a UIViewController subclass named Alternate to which you want to transition.

Alternate *alt = [[Alternate alloc] initWithNibName:nil bundle:nil];
alt.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:alt animated:YES];

这篇关于淡出动画(UIViewAnimation)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆