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

Shadylane315

macrumors regular
Original poster
Sep 7, 2006
195
0
Here is my code:

Code:
CATransition *animation = [CATransition animation];
	[animation setDuration:0.5];
	[animation setType:kCATransitionFade];
	[animation setSubtype:kCATransitionFromLeft];
	[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
	
	[[theWindow layer] addAnimation:animation forKey:@"SwitchToView1"]

When i run and build the project it does not insert the fades in between my pictures. Am i missing something here. I think i need to call this animation but where and how?
 
Look at the ViewTransitions sample app.

You need to do something inside the animation block that will fade. You create the animation block but you don't add a new view or anything that should fade.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.