为两个视图设置动画,就像您拨打电话时一样
我做了很多尝试,以达到与拨打电话号码时看到的开关效果相同的效果:前视图消失并具有缩放效果,而另一个视图也出现并具有缩放效果。
我达不到那样的效果,总是马马虎虎。似乎有一个规模效应,对不透明度有作用,但是......
你知道如何做到这一点来反映这种效果(不是马马虎虎,我有很多这样的效果)?
I have made many tries to have the same effect of switch than the one you can see when calling a phone number : the front view disapear with a zoom effect, while the other one appears also with a zoom effect.
I can't achieve doing that effect, it's always a so-so. There seems to have a scale effect, with an action on opacity, but...
Do you know how this can be done to reflect that effect (not a so-so, I have tons of those) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我希望这是一个更好的动画框架。它不能保证有效,但这是我能想到的过渡第一部分的最佳方案。
这将改变视图控制器视图的框架,使其“吸”到屏幕的中心,这是自然的黑色。现在我想起来,CGAffineTransform 会容易得多...
编辑(出于迂腐的缘故):从 iOS 4 开始,您现在可以使用更新的、语法上更干净的动画块和漂亮的转换:
I hope this is a framework for a better animation. It's not guaranteed to work, but it's the best I could think of for the first part of the transition.
This will change the frame of your view controller's view so that it "sucks" itself into the center of the screen, which is a natural black color. Now that I think about it, a CGAffineTransform would have been much easier...
EDIT (For pedantry's sake): Starting with iOS 4, you can now use the newer, and much more syntactically clean, animation blocks and a nice transform: