1

在苹果文档中

setAnimationRepeatAutoreverses:
Sets whether the animation of property changes within an animation block automatically reverses repeatedly.

Use of this method is discouraged in iOS 4.0 and later. You should use the block-based animation methods instead.

他们这样提到......但我的应用程序支持 3.0 或更高版本。我是否需要使用两个单独的代码(一个用于 3.0,一个用于 4.0 以上的块)。如何做到这一点?

4

2 回答 2

2

您可以继续使用现有代码。它将继续工作;如果可以的话,他们只是希望您使用更新的 API(正如您所说,您还不能。)

于 2010-12-15T16:56:42.270 回答
0

“旧”动画只是不鼓励而不是贬低,这是 Apple 告诉你的版本:“如果你使用基于块的动画,你不太可能编写意大利面条代码并且把事情搞得一团糟。”

这只是对正确方向的友好推动,因为旧 SDK 中的旧编译器不提供“块”,程序员已经习惯了 begin->commit 样式(如带有 glbegin、glend 的旧 opengl),但如果你这样做,那是不必要的意大利面条想要链接多个动画。

于 2010-12-15T20:24:50.330 回答