I was wondering if it is possible to use a CATransition within a custom Segue Transition. I created my CustomSegueTransition.m file and referenced it in my custom segue class where i want the transition to occur.
This is my code for the CustomSegueTransition.m file:
Code:
It gives me no error warnings, however the transition wont perform when the button is pressed to cause the segue transition. Am i missing something in the CATransition code or is this not possible?
Thanks!
momolgtm
This is my code for the CustomSegueTransition.m file:
Code:
Code:
#import "CustomSegueTransition.h"
#import "QuartzCore/QuartzCore.h"
@implementation CustomSegueTransition
-(void) perform {
// set up an animation for the transition the content
CATransition *animation = [CATransition animation];
[animation setDuration:0.25];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromRight];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
[UIView commitAnimations];
}
@end
Thanks!
momolgtm
Last edited by a moderator: