I want to crossfade two NSViews
and resize their NSWindow
. I know how to do them separately but so far not how to do it simultaneously. I think I need a CAAnimationGroup
for it. But because I'm dealing with two different objects, I don't know how to add the two animations in the group and I don't know how to start the animation because I can't call animator
on them both.
CAAnimationGroup with different interface elements
Asked Answered
you should use a CATransaction
to do this. all animations are grouped with CATransactions
, either implicitly or explicitly, check the docs for more details. Just use something like:
[CATransaction begin];
[CATransaction setAnimationDuration:1.0];
[CATransaction setAnimationTimingFunction:whatever];
// adjust layer properties here for required animations
[CATransaction commit];
© 2022 - 2024 — McMap. All rights reserved.