Hey guys, here is my code
The problem with this code is that the transition performed is the 2nd one. ie. transition1. When i click the animate button, the view jump from view1 to view3, skipping the first transition.
Please help. Thanks!
Code:
CATransition *transition = [CATransition animation];
transition.duration = 1.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFade;
transitioning = YES;
transition.delegate = self;
[containerView.layer addAnimation:transition forKey:nil];
view1.hidden = YES;
view2.hidden = NO;
CATransition *transition1 = [CATransition animation];
transition1.duration = 0.5;
transition1.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition1.type = kCATransitionFade;
transitioning = YES;
transition1.delegate = self;
[containerView.layer addAnimation:transition1 forKey:nil];
view2.hidden = YES;
view3.hidden = NO;
The problem with this code is that the transition performed is the 2nd one. ie. transition1. When i click the animate button, the view jump from view1 to view3, skipping the first transition.
Please help. Thanks!