fades and other transitions

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

  1. Shadylane315 macrumors regular

    Joined:
    Sep 7, 2006
    #1
    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?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    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