I created 2 NSAnimation objects of flipping the view with another view. I'd like to run 2 these animations simultaneously. I cannot use NSViewAnimation, since it's now about animating any of view properties.
Here is the animation creation:
self.animation = [[[TransitionAnimation alloc] initWithDuration:1.0 animationCurve:NSAnimationEaseInOut] autorelease];
[self.animation setDelegate:delegate];
[self.animation setCurrentProgress:0.0];
[self.animation startAnimation];
I tried to link 2 animations, but probably it didn't work for some reason. I took an example from: Apple developer site
configuring the NSAnimation object to use NSAnimationNonblocking doesn't show any animation at all...
EDIT: The second animation is exactly the same as the first one and created in the same place the first is created.
TransitionAnimation is a subclass of NSAnimation, where the setCurrentProgress looks like that:
- (void)setCurrentProgress:(NSAnimationProgress)progress {
[super setCurrentProgress:progress];
[(NSView *)[self delegate] display];
}
the delegate is NSView in this case, which in its drawRect function applies a time-dependent CIFilter on a CIImage. The problem is that it runs synchronous and the second animation starts right after end of the first. Is there a way to run them simultaneously?