问题描述
我正在尝试使用iPhone OS 4.0(iOS4?)SDK实现游戏。在以前版本的SDK中,我一直在使用[UIView beginAnimations:context:]和[UIView commitAnimations]来创建一些动画。但是,当我查看4.0中函数的文档时,我看到了这个注释。
I am trying to implement a game using the iPhone OS 4.0 (iOS4?) SDK. In the previous versions of the SDK, I've been using the [UIView beginAnimations:context:] and [UIView commitAnimations] to create some animations. However, when I look at the documentation of the functions in 4.0, I see this comment.
你可以在这里找到它:
You can find it here:http://developer.apple.com/iphone/library/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/commitAnimations
我的问题是,iPhone OS 4.0中基于块的动画是什么?我虽然使用了beginAnimations:context:和commitAnimations函数来创建动画块..
My question is, what are block-based animations in iPhone OS 4.0? I though that the beginAnimations:context: and commitAnimations functions were used to create animation blocks..
推荐答案
如果您按照该链接进行操作向上滚动一下,你会看到ios4的新动画方法。
If you follow that link and scroll up a bit, you will see animate methods new to ios4.
animateWithDuration:animations:
animateWithDuration:animations:completion:
animateWithDuration:delay:options:animations:completion:
还有一些相关的过渡方法。对于其中的每一个,动画参数都是:
There are also some related transition methods. For each of these, the animations argument is a block object:
是
这篇关于什么是iPhone OS 4.0中基于块的动画方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!