简体   繁体   English

可可弹出窗口动画

[英]Cocoa popUp window animation

I want to make popup window animation like when you try create new project in xcode: 我想制作弹出窗口动画,就像您尝试在xcode中创建新项目时一样:

在此处输入图片说明

I have been looking for documentation or examples but so far I have not found anything. 我一直在寻找文档或示例,但到目前为止我还没有发现任何东西。 Any of you knows how can I build this window popup animation? 你们谁都知道如何制作此窗口弹出动画?

I'll really appreciate your help 非常感谢您的帮助

Are you talking about making a panel appear over the main window, sliding down? 您是在谈论使面板向下滑动显示在主窗口中吗?

In this case it's simple: make an NSWindow or NSPanel in Interface Builder, then connect it to an IBOutlet in your AppDelegate or your view controller. 在这种情况下很简单:在Interface Builder中制作一个NSWindow或NSPanel,然后将其连接到AppDelegate或视图控制器中的IBOutlet。

Let's say the new outlet is named "myNewPanel", then you can call it on your window: 假设新的出口名为“ myNewPanel”,则可以在窗口中调用它:

myExistingWindow.beginSheet(myNewPanel, completionHandler: nil)

And to close it: 并关闭它:

myExistingWindow.endSheet(myNewPanel)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM