-4

I want to initialise the duration of a CATransition with a NSNumber, how do i do this, since the animation.duration is a NSTimeInterval object?

- (void)startPopUpAnimation:(NSNumber *)numbers {

    CATransition *animation = [CATransition animation];
    animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    animation.type = kCATransitionFade;
    animation.duration = @"2.15";//[NSNumber numberWithDouble:[numbers doubleValue]];

}
bruno
  • 2,154
  • 5
  • 39
  • 64

1 Answers1

0

This was easier than i thought:

animation.duration is a typedef double so i just did: animation.duration = [numbers doubleValue];

bruno
  • 2,154
  • 5
  • 39
  • 64