Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between these three concepts, Animation, Transition and Transaction in iOS

These three concepts are all from Core Animation, but i don't really understand the difference between them. Because animation and transition seems quite similar to me, and transaction as well.

like image 646
Scott Zhu Avatar asked Jan 04 '14 16:01

Scott Zhu


People also ask

What are some differences between animations and transitions?

An animation is a special effect that applies to a single element on a slide such as text, a shape, an image, and so on. A transition is the special effect that occurs when you exit one slide and move on to the next during a presentation.

What is animation state and transition?

Description. Transitions define when and how the state machine switch from one state to another. AnimatorStateTransition always originate from an Animator State (or AnyState) and have timing parameters. A transition happens when all its conditions are met. AnimatorStateTransition derives from AnimatorTransitionBase.

What is the difference between animation and slide?

Slide transition is the graphical effect while moving from one slide to another. Slide animation refers to the animation given to the various objects inside the slide itself.


1 Answers

Animation is a general term for making a view object change it's appearance smoothly from one state to another state over time.

A transition is a specific type of animation for switching between views, view controllers, or layers. The Core Animation framework includes specific calls to support transitions, as well as more general-purpose animations. There are also UIKit calls that handle view and view controller transitions. (See, for example, transitionFromView:toView:duration:options:completion:, transitionFromViewController:toViewController:duration:options:animations:completion:, and transitionWithView:duration:options:animations:completion: )

A "transaction" is a Core Animation term that refers to a discrete set of UI changes that are grouped together and submitted to the Core Animation engine for rendering together as a group. Most of the time the system creates animation transactions for you behind the scenes as a result of your animation code (known as "implicit transactions".) Take a look at the Xcode docs for CATransaction for more information.

like image 177
Duncan C Avatar answered Oct 05 '22 19:10

Duncan C