Why is [[NSWindow animator] setFrame…] very laggy sometimes?

对着背影说爱祢 提交于 2019-12-05 22:15:57

The NSWindow animator uses NSAnimation, which means that it rapidly fires a timer to animate the frame of the window. At each frame of the animation, every view inside the window is redrawn. If you have large views with somewhat complex view hierarchies, the performance is quite bad and there's no real way to work around it.

I would recommend JNWAnimatableWindow as a substitute for the default NSWindow animator, as it uses a Core Animation CALayer to perform animations on and therefore is much smoother.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!