Difference between revisions of "CATransition"

From iPhone Development Wiki
Jump to: navigation, search
(availability & subtypes. Added simple info about the 'rotate' transition.)
m
 
Line 15: Line 15:
 
</gallery>
 
</gallery>
  
== subtype and filter ==
+
== Subtype and filter ==
 +
 
 
{{main|CAFilter}}
 
{{main|CAFilter}}
 +
 
Many transitions have are further divided into several discrete subtypes. They often control the movement direction of the animation.  
 
Many transitions have are further divided into several discrete subtypes. They often control the movement direction of the animation.  
  
Line 71: Line 73:
 
<!-- 3.0+: Check function __ZN2CA6Render10Transition17lookup_transitionEj -->
 
<!-- 3.0+: Check function __ZN2CA6Render10Transition17lookup_transitionEj -->
  
The following shows the availability of different CATransitions starting from 2.0
+
The following shows the availability of different CATransitions starting from 2.0:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 97: Line 99:
 
|}
 
|}
  
== References ==
+
== External links ==
 +
 
 
* Official reference: {{sdklink|QuartzCore|CATransition}}
 
* Official reference: {{sdklink|QuartzCore|CATransition}}
 
{{IPFHeader|QuartzCore|.framework|2}}
 
{{IPFHeader|QuartzCore|.framework|2}}

Latest revision as of 05:24, 26 October 2014

CATransition is an Objective-C wrapper for creating view transitions. As of 3.1.2, there are 11 types of transitions. 4 of them are SDK-compatible, but are the most boring ones. The following shows all 11 types of transition from picture "A" to "B" at 40%. The subtypes, if any, is "fromLeft".

Subtype and filter

Many transitions have are further divided into several discrete subtypes. They often control the movement direction of the animation.

Some transitions accept addition arguments through the filter property, for example, you can set the location of suckEffect using

...
CAFilter* filter = [CAFilter filterWithName:@"suckEffect"];
[filter setValue:[NSValue valueWithCGPoint:CGPointMake(160, 240)] forKey:@"inputPosition"];
transition.filter = filter;
...
Transition Subtypes Accepted parameters
moveIn
push
reveal
fromLeft, fromRight, fromBottom, fromTop -
pageCurl, pageUnCurl fromLeft, fromRight, fromTop, fromBottom float inputColor[];
cube
alignedCube
fromLeft, fromRight, fromTop, fromBottom float inputAmount; (perspective)
flip
alignedFlip
oglFlip
fromLeft, fromRight, fromTop, fromBottom float inputAmount;
cameraIris - CGPoint inputPosition;
rippleEffect - -
rotate 90cw, 90ccw, 180cw, 180ccw -
suckEffect - CGPoint inputPosition;

Availability

The following shows the availability of different CATransitions starting from 2.0:

CATransition Availability
fade
moveIn
push
reveal
(Public API) 2.0–
flip
alignedFlip
oglFlip
2.0–
cube
alignedCube
2.0–
pageCurl
pageUnCurl
2.0–
rippleEffect 2.0–
suckEffect 2.0–
cameraIris
cameraIrisHollowOpen
cameraIrisHollowClose
2.0–
rotate 4.0–
spewEffect
genieEffect
unGenieEffect
twist
swirl
charminUltra
reflection
zoomyIn
zoomyOut
mapCurl
mapUnCurl
oglApplicationSuspend
cameraIrisHollow
2.0–2.2

External links