I'm building an audio application and am wanting to implement a visualizer feature using Core Graphics. I'm looking for a way to redraw an NSView as often as possible. I've been experimenting with using an NSTimer to call a function which sets NeedsDisplay = true;
. It seems to work but I'd like to know if there's a better way to do it where I'm not relying on NSTimer and hardcoded framerate.
I tried setting NeedsDisplay
from within the DrawRect
method itself, but this doesn't create a loop.
↧
Making an animation loop
↧