I want to crossfade two NSViews and resize their NSWindow. I know how to do them 开发者_如何学Goseparately 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.
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];
加载中,请稍侯......
精彩评论