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

momolgtm

macrumors newbie
Original poster
Nov 25, 2009
9
0
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:
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
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
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.