Chandan Shetty SP
Chandan Shetty SP

Reputation: 5117

Block based animation?

In apple documentation

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.

They mentioned like this... But my app supports from 3.0 or later. Do i need to use two separate codes( one for 3.0 and blocks above 4.0). How to accomplish this?

Upvotes: 1

Views: 882

Answers (2)

Dunkelstern
Dunkelstern

Reputation: 1624

The "old" animations are just discouraged not deceprated, this is Apples version of telling you: "If you use block based animations you'll unlikely write spaghetti code and mess things up really bad."

It's just a friendly nudge into the right direction, as "blocks" were not available with the older compilers in the older SDKs programmers got used to the begin->commit style (like old opengl with glbegin, glend) but that's unneccessarily spaghettiish if you want to chain multiple animations.

Upvotes: 0

Jonathan Grynspan
Jonathan Grynspan

Reputation: 43472

You can keep using your existing code. It will continue to work; they would just prefer you to use newer APIs if you can (which, as you've said, you can't yet.)

Upvotes: 2

Related Questions