偶想实现对一个NSView的一些动画效果。
如移动:
NSAnimationContext beginGrouping];
NSAnimationContext currentContext] setDuration:3];
self animator] setFrameOrigin:NSMakePoint(300, 300)];
NSAnimationContext endGrouping];
偶想等到动画结束后再继续,请问有什么方法可以实现呢?
现在有2种想法:
1.在动画结束后执行animationDidEnd:,但不知道上述代码如何setDelegate:。。。
2. setCompletionHandler:,但是偶对^(void)handler不太了解。
或者还有别的通过控制线程来实现的方法吗?(performSelector:waitUntilDone:YES这种?)
偶只是高中生一只。。想编一下mac上的程序。。
不知有好心的大大来帮帮忙么?~非常感谢啦>_<