Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i'm very new to core animation. i'd like to know if you can do simple motion/shape tweening like in Flash, or is it all only a frame by frame array of static images?

for example: can i produce an animation by only having an array of 2 images: a circle and a square. using start coordinates for the circle, end coordinates for the square and a timer, create a animation of the circle moving across the screen while morphing (or blending) into the square?

if so, that would be amazing.
 
i'm very new to core animation. i'd like to know if you can do simple motion/shape tweening like in Flash, or is it all only a frame by frame array of static images?

for example: can i produce an animation by only having an array of 2 images: a circle and a square. using start coordinates for the circle, end coordinates for the square and a timer, create a animation of the circle moving across the screen while morphing (or blending) into the square?

if so, that would be amazing.

Core Animation only lets you work with rectangular layers. You can't "morph" from one NSBezierPath shape to another, but I'm pretty sure you can fade a layer's content from one image to another. (i.e. draw a circle into a layer and fade it into a square).

Core Animation isn't Flash. It serves an entirely different purpose.
 
as far as i can tell core animation can only tween transformations and filters (although the filter animation never worked for me even though it was copy pasted code from the documentation :confused:)

if you want to do some morphing of shapes i think you have to just do it on the core graphics level...
 
Sample App

Hey, i've attached a sample app for you that demonstrates a image that fades from one to the other while it is moving. Press the button a couple times and it changes the image back and forth... Hope it helps.
 

Attachments

  • Waste.zip
    116.8 KB · Views: 187
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.