【发布时间】:2015-09-21 08:28:57
【问题描述】:
我在 Objective-C 中有一个 mac 应用程序。
其中,我希望我的按钮在几秒钟后像增长一样动画。
我在 Cocoa 应用程序中找不到任何东西。
[UIView beginAnimations:nil context:NULL];
CGRect pos=v2.bounds;
pos.size.height=500;
pos.size.width=500;
[UIView setAnimationDuration:1.0];
[UIView setAnimationRepeatCount:15];
[UIView setAnimationRepeatAutoreverses:YES];
v2.bounds=pos;
[UIView commitAnimations];
我在 ios 中使用了上面的代码来增长一个按钮,但是如何在 cocoa mac 应用程序中实现呢?
所以基本上我想要一个 NSButton 的放大和缩小动画。
【问题讨论】:
标签: objective-c macos animation nsbutton