I have a View that has a number of layers in it, I use the following
code to substitute one for another... If its a composition I want it
to be back at the start, I am using the QTMovieLayer as a workaround
due to a performance problem with multiple QCCompositions in one layer.
Anyway, _sometimes_ my animation stops with this error
LayerPlayer[11245:10b] -[QCPatch executeSubpatches:arguments:]: "time"
must be positive or null
I have also tried setting the begintime to 0, and the offset to 0 too.
I also tried adding in the layer hidden, setting time, then revealing
it, but same problem. Any clues appreciated.
Peter
- - -
if([nextLayer class]==[QTMovieLayer class]) {
QTMovie *theMovie=[(QTMovieLayer *)nextLayer movie];
[theMovie gotoBeginning];
[theMovie play];
} else if([nextLayer class]==[QCCompositionLayer class]) {
[nextLayer setBeginTime:CACurrentMediaTime()];
}
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:1.6f]
forKey:kCATransactionAnimationDuration];
[[mainView layer] replaceSublayer:currentLayer with:nextLayer];
[CATransaction commit];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]