全屏狮子复合动画
我正在将窗口转换为全屏模式(新的 Lion 类型的全屏模式)。当我进行转换时,我还想将 NSWindow
中的视图之一滑动到新位置。
因此,在我的 NSWindowDelegate 中,我尝试返回窗口并实现自定义动画:
- (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
{
return [NSArray arrayWithObject: window];
}
- (void)window:(NSWindow *)_window startCustomAnimationToEnterFullScreenWithDuration:(NSTimeInterval)duration
{
// book is NSView *ivar
[[book animator] setFrame: NSMakeRect(/*computed rect*/)];
}
但这完全杀死了进入全屏模式的默认动画,并且我的窗口突然无法正确绘制。
有没有办法在仍然使用默认动画的同时复合这些?我对[view animator]
级别的核心动画还很陌生,所以我确信我搞砸了一些非常简单的事情。
I'm transitioning a window to full screen mode (the new Lion kind of full screen mode). While I do the transition, I'd like to also slide one of the views in my NSWindow
to a new position.
So, in my NSWindowDelegate
, I've tried returning the window and implementing the custom animation:
- (NSArray *)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
{
return [NSArray arrayWithObject: window];
}
- (void)window:(NSWindow *)_window startCustomAnimationToEnterFullScreenWithDuration:(NSTimeInterval)duration
{
// book is NSView *ivar
[[book animator] setFrame: NSMakeRect(/*computed rect*/)];
}
But this completely kills the default animation of going to full-screen mode and my window suddenly doesn't paint correctly.
Is there some way to compound these while still using the default animation? I'm pretty new to core animation beyond [view animator]
level stuff, So I'm sure I'm screwing up something quite simple.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你必须写这样的东西才能使两个动画同步:
You have to write something like this in order to have the two animations in sync: