fades and other transitions

Discussion in 'iOS Programming' started by Shadylane315, Sep 9, 2009.

  1. Shadylane315 macrumors regular

    Sep 7, 2006
    Here is my 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?
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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.

Share This Page