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]];
}
This was easier than i thought:
animation.duration
is a typedef double
so i just did: animation.duration = [numbers doubleValue];