osx - Frame-by-frame animation in MacOs -


i'm looking way frame-by-frame programmatically drawn animations in macos application (not keyframe property animation). have tried drawing calayers using drawlayer:incontext: delegate method, calling setneedsdisplay draw each frame, i'm getting poor performance doing way. there recommended way type of animation in cocoa?

a way entirely custom animations using cadisplaylink (ios) or cvdisplaylink (macos). cvdisplaylink timer fires display refreshes.

you can calculate own timing functions based on values off cvdisplaylink. api still c bit cumbersome use, in swift, once how functions works charm.

i have had experiences cvdisplaylink, layers. performant. able animate 1000+ layers cvdisplaylink driven @ 60fps without problems.

if need in using api, feel free ask!

alternative:

if want use more modern api, can recommend spritekit. there nice animation apis well. , perform good. apple uses draw more complex views (like memory debugger in xcode).


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -